home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / prog / gnu-c / src / gcc-2.7.0-amiga / configure < prev    next >
Text File  |  1995-08-24  |  75KB  |  3,052 lines

  1. #!/bin/sh
  2. # Configuration script for GNU CC
  3. #   Copyright (C) 1988, 90, 91, 92, 93, 94, 1995 Free Software Foundation, Inc.
  4.  
  5. #This file is part of GNU CC.
  6.  
  7. # AmigaDOS Notes:  Where "echo" can be invoked with a first arg that
  8. # starts with '-', run the external echo instead, since the pdksh builtin
  9. # version botches this case.
  10.  
  11. #GNU CC is free software; you can redistribute it and/or modify
  12. #it under the terms of the GNU General Public License as published by
  13. #the Free Software Foundation; either version 2, or (at your option)
  14. #any later version.
  15.  
  16. #GNU CC is distributed in the hope that it will be useful,
  17. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. #GNU General Public License for more details.
  20.  
  21. #You should have received a copy of the GNU General Public License
  22. #along with GNU CC; see the file COPYING.  If not, write to
  23. #the Free Software Foundation, 59 Temple Place - Suite 330,
  24. #Boston, MA 02111-1307, USA.
  25.  
  26. #
  27. # Shell script to create proper links to machine-dependent files in
  28. # preparation for compiling gcc.
  29. #
  30. # Options: --srcdir=DIR        specifies directory where sources are.
  31. #        --host=HOST        specifies host configuration.
  32. #       --target=TARGET    specifies target configuration.
  33. #       --build=TARGET    specifies configuration of machine you are
  34. #                using to compile GCC.
  35. #       --prefix=DIR        specifies directory to install in.
  36. #       --local-prefix=DIR    specifies directory to put local ./include in.
  37. #       --gxx-include-dir=DIR specifies directory to put g++ header files in.
  38. #       --exec-prefix=DIR    specifies directory to install executables in.
  39. #       --with-gnu-ld    arrange to work with GNU ld.
  40. #       --with-gnu-as    arrange to work with GAS.
  41. #       --with-stabs        arrange to use stabs instead of host debug format.
  42. #       --with-elf        arrange to use elf instead of host debug format.
  43. #       --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)
  44. #       --disable-FOO    do not include feature FOO
  45. #       --nfp        assume system has no FPU.
  46. #       --program-prefix=PREFIX specifies prefix for executable names.
  47. #       --program-suffix=SUFFIX specifies suffix for executable names.
  48. #       --program-transform-name=SED-EXPR specifies `sed' expression to
  49. #                apply to executable names.
  50. #
  51. # If configure succeeds, it leaves its status in config.status.
  52. # If configure fails after disturbing the status quo, 
  53. #     config.status is removed.
  54. #
  55.  
  56. progname=$0
  57.  
  58. # Default --srcdir to the directory where the script is found, 
  59. # if a directory was specified.
  60. # The first sed call works around a bug in the AmigaDOS port of sksh, where
  61. # $0 has a trailing slash appended to it.  It is a NOP for other systems.
  62. # The third sed call is to convert `.//configure' to `./configure'.
  63. srcdir=`echo $0 | sed 's|/$||' | sed 's|//|/|' | sed 's|/[^/]*$||'`
  64. if [ x$srcdir = x$0 ]
  65. then
  66. srcdir=
  67. fi
  68. # On systems where GCC is the native compiler, $prefix should be
  69. # /usr. But the user can change it with configure --prefix=/foo/bar
  70. native_prefix=/usr
  71.  
  72.  
  73. host=
  74.  
  75. # Note:  For AmigaDOS we want this to default to /gnu unless we specify
  76. # otherwise to configure.  We also don't want to have to remember to always
  77. # configure with "--prefix=/gnu".  Changing it in Makefile.in or in
  78. # config/m68k/x-amigados is ineffective since configure will always change
  79. # it back in the final generated Makefile, so we have to go to the root of
  80. # the problem, which is here.  There should be a way to do this in the
  81. # individual machine configuration files!  -fnf
  82. # here.  -fnf
  83. # Default prefix to "/gnu".
  84. prefix=/gnu
  85.   
  86. # On systems where GCC is the native compiler, $prefix should be
  87. # /usr. But the user can change it with configure --prefix=/foo/bar
  88. native_prefix=/usr
  89.  
  90. # local_prefix specifies where to find the directory /gnu/local/include
  91. # We don't use $(prefix) for this
  92. # because we always want GCC to search /gnu/local/include
  93. # even if GCC is installed somewhere other than /gnu/local.
  94. # Think THREE TIMES before specifying any other value for this!
  95. # DO NOT make this use $prefix!
  96. # Note:  See AmigaDOS note above for this AmigaDOS specific change.  -fnf
  97. # NoteII:We don't want to have yet-another-assign so we use /gnu/local
  98. local_prefix=/gnu/local
  99. # Default is to let the Makefile set exec_prefix from $(prefix)
  100. exec_prefix='$(prefix)'
  101. #
  102. # The default g++ include directory is $(libdir)/g++-include.
  103. gxx_include_dir='$(libdir)/g++-include'
  104.  
  105. # Default --program-transform-name to nothing.
  106. program_transform_name=
  107. program_transform_set=
  108.  
  109. remove=rm
  110. # AmigaDOS specific change.  Although we support symbolic links using
  111. # the GNU tools, they need to be made using the syntax "somewhere:foo/bar"
  112. # and not "/somewhere/foo/bar", since they must be in standard AmigaDOS
  113. # format.  This should probably be done by having GNU ln translate paths
  114. # that start with '/' to canonical AmigaDOS device:name form.
  115. hard_link=cp
  116. symbolic_link=cp
  117. copy=cp
  118.  
  119. # Record all the arguments, to write them in config.status.
  120. arguments=$*
  121.  
  122. #for Test
  123. #remove="echo rm"
  124. #hard_link="echo ln"
  125. #symbolic_link="echo ln -s"
  126.  
  127. target=
  128. host=
  129. build=
  130. name1=
  131. name2=
  132.  
  133. for arg in $*;
  134. do
  135.   case $next_arg in
  136.   --srcdir)
  137.     srcdir=$arg
  138.     next_arg=
  139.     ;;
  140.   --host)
  141.     host=$arg
  142.     next_arg=
  143.     ;;
  144.   --target)
  145.     target=$arg
  146.     next_arg=
  147.     ;;
  148.   --build)
  149.     build=$arg
  150.     next_arg=
  151.     ;;
  152.   --prefix)
  153.     prefix=$arg
  154.     native_prefix=$prefix
  155.     next_arg=
  156.     ;;
  157.   --local-prefix)
  158.     local_prefix=$arg
  159.     next_arg=
  160.     ;;
  161.   --gxx-include-dir)
  162.     gxx_include_dir=$arg
  163.     next_arg=
  164.     ;;
  165.   --exec-prefix)
  166.     exec_prefix=$arg
  167.     next_arg=
  168.     ;;
  169.   --program-transform-name)
  170.     # Double any backslashes or dollar signs in the argument.
  171.     if [ -n "${arg}" ] ; then
  172.       program_transform_name="${program_transform_name} -e `/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  173.     fi
  174.     program_transform_set=yes
  175.     next_arg=
  176.     ;;    
  177.   --program-prefix)
  178.     if [ -n "${arg}" ]; then
  179.       program_transform_name="${program_transform_name} -e s,^,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  180.     fi
  181.     program_transform_set=yes
  182.     next_arg=
  183.     ;;
  184.   --program-suffix)
  185.     if [ -n "${arg}" ]; then
  186.       program_transform_name="${program_transform_name} -e s,\$\$,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  187.     fi
  188.     program_transform_set=yes
  189.     next_arg=
  190.     ;;
  191.   --x-*)
  192.     next_arg=
  193.     ;;
  194.   *)
  195.     case $arg in
  196.       -*)
  197.     if [ x$name1 != x ]
  198.     then
  199.         echo "Positional arguments must be last." 1>&2
  200.         exit 1
  201.     fi
  202.     ;;
  203.     esac
  204.  
  205.     case $arg in
  206.      -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  207.     next_arg=--srcdir
  208.     ;;
  209.      -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  210.     srcdir=`/bin/echo $arg | sed 's/-*s[a-z]*=//'`
  211.     ;;
  212.      -host | --host | --hos | --ho)
  213.     next_arg=--host
  214.     ;;
  215.      -host=* | --host=* | --hos=* | --ho=*)
  216.     host=`/bin/echo $arg | sed 's/-*h[a-z]*=//'`
  217.     ;; 
  218.      -target | --target | --targe | --targ | --tar | --ta | --t)
  219.     next_arg=--target
  220.     ;;
  221.      -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  222.     target=`/bin/echo $arg | sed 's/-*t[a-z]*=//'`
  223.     ;; 
  224.      -build | --build | --buil | --bui | --bu | --b)
  225.     next_arg=--build
  226.     ;;
  227.      -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  228.     build=`/bin/echo $arg | sed 's/-*b[a-z]*=//'`
  229.     ;; 
  230.      -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  231.     next_arg=--prefix
  232.     ;;
  233.      -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  234.     prefix=`/bin/echo $arg | sed 's/-*p[a-z]*=//'`
  235.     native_prefix=$prefix
  236.     ;;
  237.      -local-prefix | --local-prefix | --local-prefi | --local-pref | --local-pre \
  238.     | --local-pr | --local-p | --local- | --local | --loc | --lo | --l)
  239.     next_arg=--local-prefix
  240.     ;;
  241.      -local-prefix=* | --local-prefix=* | --local-prefi=* | --local-pref=* \
  242.     | --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
  243.     | --loc=* | --lo=* | --l=*)
  244.     local_prefix=`/bin/echo $arg | sed 's/-*l[-a-z]*=//'`
  245.     ;;
  246.      -gxx-include-dir | --gxx-include-dir | --gxx-include \
  247.     | --gxx-incl | --gxx-inc | --gxx-in | --gxx-i | --gxx- \
  248.     | --gxx | --gxx | --gx | --g)
  249.     next_arg=--gxx-include-dir
  250.     ;;
  251.      -gxx-include-dir=* | --gxx-include-dir=* | --gxx-include=* \
  252.     | --gxx-incl=* | --gxx-inc=* | --gxx-in=* | --gxx-i=* \
  253.     | --gxx-=* | --gxx=* | --gxx=* | --gxx=* | --g=*)
  254.     gxx_include_dir=`/bin/echo $arg | sed 's/-*g[-a-z]*=//'`
  255.     ;;
  256.      -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
  257.     | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
  258.     next_arg=--exec-prefix
  259.     ;;
  260.      -exec-prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* \
  261.     | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
  262.     | --exe=* | --ex=* | --e=*)
  263.     exec_prefix=`/bin/echo $arg | sed 's/-*e[-a-z]*=//'`
  264.     ;;
  265.      -program-transform-name | --program-transform-name \
  266.     | --program-transform-nam | --program-transform-na \
  267.     | --program-transform-n | --program-transform- | --program-transform \
  268.     | --program-transfor | --program-transfo | --program-transf \
  269.     | --program-trans | --program-tran | --program-tra \
  270.     | --program-tr | --program-t)
  271.     next_arg=--program-transform-name
  272.     ;;
  273.      -program-transform-name=* | --program-transform-name=* \
  274.     | --program-transform-nam=* | --program-transform-na=* \
  275.     | --program-transform-n=* | --program-transform-=* \
  276.     | --program-transform=* | --program-transfor=* | --program-transfo=* \
  277.     | --program-transf=* | --program-trans=* | --program-tran=* \
  278.     | --program-tra=* | --program-tr=* | --program-t=*)
  279.     arg=`/bin/echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  280.     # Double any \ or $ in the argument.
  281.     if [ -n "${arg}" ] ; then
  282.       program_transform_name="${program_transform_name} -e `/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  283.     fi
  284.     program_transform_set=yes
  285.     ;;
  286.      -program-prefix | --program-prefix | --program-prefi \
  287.     | --program-pref | --program-pre | --program-pr \
  288.     | --program-p)
  289.     next_arg=--program-prefix
  290.     ;;
  291.      -program-prefix=* | --program-prefix=* | --program-prefi=* \
  292.     | --program-pref=* | --program-pre=* | --program-pr=* \
  293.     | --program-p=*)
  294.     arg=`/bin/echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  295.     if [ -n "${arg}" ]; then
  296.       program_transform_name="${program_transform_name} -e s,^,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  297.     fi
  298.     program_transform_set=yes
  299.     ;;
  300.      -program-suffix | --program-suffix | --program-suffi \
  301.     | --program-suff | --program-suf | --program-su \
  302.     | --program-s)
  303.     next_arg=--program-suffix
  304.     ;;
  305.      -program-suffix=* | --program-suffix=* | --program-suffi=* \
  306.     | --program-suff=* | --program-suf=* | --program-su=* \
  307.     | --program-s=*)
  308.     arg=`/bin/echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  309.     if [ -n "${arg}" ]; then
  310.       program_transform_name="${program_transform_name} -e s,\$\$,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  311.     fi
  312.     program_transform_set=yes
  313.     ;;
  314.      -with-gnu-ld | --with-gnu-ld | --with-gnu-l)
  315.     gnu_ld=yes
  316.     ;;
  317.      -gas | --gas | --ga | --g | -with-gnu-as | --with-gnu-as | -with-gnu-a)
  318.         gas=yes
  319.     ;;
  320.      -nfp | --nfp | --nf | --n)
  321.     nfp=yes
  322.     ;;
  323.      -with-stabs | -with-stab | -with-sta | -with-st | -with-s \
  324.     | --with-stabs | --with-stab | --with-sta | --with-st | --with-s \
  325.     | -stabs | -stab | -sta | -st  \
  326.     | --stabs | --stab | --sta | --st)
  327.     stabs=yes
  328.     ;;
  329.      -with-elf | -with-el | -with-se \
  330.     | --with-elf | --with-el | --with-e \
  331.     | -elf | -el | -e \
  332.     |--elf | --el | --e)
  333.     elf=yes
  334.     ;;
  335.      -with-* | --with-*) ;; #ignored
  336.      -without-* | --without-*) ;; #ignored
  337.      -disable-* | --disable-*)
  338.     enableopt=`echo ${arg} | sed 's:^-*disable-:enable_:;s:-:_:g'`
  339.     eval $enableopt=no
  340.     ;;
  341.      -enable-* | --enable-*)
  342.     case "$arg" in
  343.     *=*)    optarg=`echo $arg | sed 's:^[^=]*=::;s:-:_:g'` ;;
  344.     *)    optarg=yes ;;
  345.     esac
  346.     enableopt=`echo ${arg} | sed 's:^-*::;s:=.*$::;s:-:_:g'`
  347.     eval $enableopt="$optarg"
  348.     ;;
  349.      -x | --x) ;; # ignored
  350.      -x-*=* | --x-*=*) ;; # ignored
  351.      -x-* | --x-*)
  352.     next_arg=--x-ignored # ignored
  353.     ;;
  354.      --he*) ;; # ignored for now (--help)
  355.      --vers*) ;; # ignored for now (--version)
  356.      -v | -verb* | --verb*) ;; # ignored for now (--verbose)
  357.      --program-*) ;; #ignored (--program-prefix, --program-suffix)
  358.      --c*) ;; #ignored (--cache-file)
  359.      --q*) ;; #ignored (--quiet)
  360.      --si*) ;; #ignored (--silent)
  361.      -*)
  362.     echo "Invalid option \`$arg'" 1>&2
  363.     exit 1
  364.     ;;
  365.      *)
  366. # Allow configure HOST TARGET.  If just one name is given, it is used
  367. # as both unless a host was previously given, in which case it is
  368. # just the target.
  369.     if [ x$name1 != x ]
  370.     then
  371.         if [ x$name2 != x ]
  372.         then
  373.             echo "More than two configuration names." 1>&2
  374.             exit 1
  375.         fi
  376.         name2=$arg
  377.     elif [ x$host != x ]
  378.     then
  379.         name1=$host
  380.         name2=$arg
  381.         host=
  382.     else
  383.         name1=$arg
  384.     fi
  385.     ;;
  386.     esac
  387.   esac
  388. done
  389.  
  390. if [ x$name1 != x ]
  391. then
  392.     if [ x$name2 = x ]
  393.     then
  394.         name2=$name1
  395.     fi
  396.  
  397.     if [ x$host != x ]
  398.     then
  399.         echo "Duplicate specification of host." 1>&2
  400.         exit 1
  401.     fi
  402.  
  403.     if [ x$target != x ]
  404.     then
  405.         echo "Duplicate specification of target." 1>&2
  406.         exit 1
  407.     fi
  408.  
  409.     host=$name1
  410.     build=$name1
  411.     target=$name2
  412. fi
  413.  
  414. # Find the source files, if location was not specified.
  415. if [ x$srcdir = x ]
  416. then
  417.     srcdirdefaulted=1
  418.     srcdir=.
  419.     if [ ! -r tree.c ]
  420.     then
  421.         srcdir=..
  422.     fi
  423. fi
  424.  
  425. if [ ! -r ${srcdir}/tree.c ]
  426. then
  427.     if [ x$srcdirdefaulted = x ]
  428.     then
  429.       echo "$progname: Can't find compiler sources in \`${srcdir}'" 1>&2
  430.     else
  431.       echo "$progname: Can't find compiler sources in \`.' or \`..'" 1>&2
  432.     fi
  433.     exit 1
  434. fi
  435.  
  436. if [ -r ${srcdir}/config.status ] && [ x$srcdir != x. ]
  437. then
  438.     echo "$progname: \`configure' has been run in \`${srcdir}'" 1>&2
  439.     exit 1
  440. fi
  441.  
  442. # Complain if an arg is missing
  443. if [ x$build = x ]
  444. then
  445.     # If host was specified, always use it for build also to avoid
  446.     # confusion.  If someone wants a cross compiler where build != host,
  447.     # then they must specify build explicitly.  Since this case is
  448.     # extremely rare, it does not matter that it is slightly inconvenient.
  449.     if [ x$host != x ]
  450.     then
  451.         build=$host
  452.     
  453.     # This way of testing the result of a command substitution is
  454.     # defined by Posix.2 (section 3.9.1) as well as traditional shells.
  455.     elif build=`${srcdir}/config.guess`
  456.     then
  457.         echo "This appears to be a ${build} system." 1>&2
  458.  
  459.     elif [ x$target != x ]
  460.     then
  461.         echo 'Config.guess failed to determine the host type.  Defaulting to target.'
  462.         build=$target
  463.     else
  464.         echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
  465.         echo "\
  466. Usage: `basename $progname` [--host=HOST] [--build=BUILD]
  467.        [--prefix=DIR] [--gxx-include-dir=DIR] [--local-pref=DIR] [--exec-pref=DIR]
  468.        [--with-gnu-as] [--with-gnu-ld] [--with-stabs] [--with-elf] [--nfp] TARGET" 1>&2
  469.     echo "Where HOST, TARGET and BUILD are three-part configuration names " 1>&2
  470.         if [ -r config.status ]
  471.         then
  472.             tail +2 config.status 1>&2
  473.         fi
  474.         exit 1
  475.     fi
  476. fi
  477.  
  478. # If $host was not specified, use $build.
  479. if [ x$host = x ]
  480. then
  481.     host=$build
  482. fi
  483.  
  484. # If $target was not specified, use $host.
  485. if [ x$target = x ]
  486. then
  487.     target=$host
  488. fi
  489.  
  490. build_xm_file=
  491. host_xm_file=
  492. host_xmake_file=
  493. host_broken_install=
  494. host_install_headers_dir=install-headers-tar
  495. host_truncate_target=
  496.  
  497. # Validate the specs, and canonicalize them.
  498. canon_build=`/bin/sh $srcdir/config.sub $build` || exit 1
  499. canon_host=`/bin/sh $srcdir/config.sub $host` || exit 1
  500. canon_target=`/bin/sh $srcdir/config.sub $target` || exit 1
  501.  
  502. # Decode the host machine, then the target machine.
  503. # For the host machine, we save the xm_file variable as host_xm_file;
  504. # then we decode the target machine and forget everything else
  505. # that came from the host machine.
  506. for machine in $canon_build $canon_host $canon_target; do
  507.  
  508.     cpu_type=
  509.     xm_file=
  510.     tm_file=
  511.     out_file=
  512.     xmake_file=
  513.     tmake_file=
  514.     extra_headers=
  515.     extra_passes=
  516.     extra_parts=
  517.     extra_programs=
  518.     extra_objs=
  519.     # Set this to force installation and use of collect2.
  520.     use_collect2=
  521.     # Set this to override the default target model.
  522.     target_cpu_default=
  523.     # Set this to force use of install.sh (if set to 'yes')
  524.     # Set to name of installer to use a custom installer.
  525.     broken_install=
  526.     # Set this to control which fixincludes program to use.
  527.     fixincludes=fixincludes
  528.     # Set this to control how the header file directory is installed.
  529.     install_headers_dir=install-headers-tar
  530.     # Set this to a non-empty list of args to pass to cpp if the target
  531.     # wants its .md file passed through cpp.
  532.     md_cppflags=
  533.     # Set this if directory names should be truncated to 14 characters.
  534.     truncate_target=
  535.     # Set this if gdb needs a dir command with `dirname $out_file`
  536.     gdb_needs_out_file_path=
  537.  
  538.     case $machine in
  539.     # Support site-specific machine types.
  540.     *local*)
  541.         cpu_type=`echo $machine | sed -e 's/-.*//'`
  542.         rest=`echo $machine | sed -e "s/$cpu_type-//"`
  543.         xm_file=${cpu_type}/xm-$rest.h
  544.         tm_file=${cpu_type}/$rest.h
  545.         if [ -f $srcdir/config/${cpu_type}/x-$rest ] ; \
  546.         then xmake_file=${cpu_type}/x-$rest; \
  547.         else true; \
  548.         fi
  549.         if [ -f $srcdir/config/${cpu_type}/t-$rest ] ; \
  550.         then tmake_file=${cpu_type}/t-$rest; \
  551.         else true; \
  552.         fi
  553.         ;;
  554.     1750a-*-*)
  555.         ;;
  556.     a29k-*-bsd* | a29k-*-sym1*)
  557.         tm_file=a29k/unix.h
  558.         xm_file=a29k/xm-unix.h
  559.         xmake_file=a29k/x-unix
  560.         tmake_file=a29k/t-a29k
  561.         use_collect2=yes
  562.         ;;
  563.     a29k-*-udi | a29k-*-coff)
  564.         tmake_file=a29k/t-a29kbare
  565.         tm_file=a29k/a29k-udi.h
  566.         ;;
  567.     a29k-*-vxworks*)
  568.         tmake_file=a29k/t-vx29k
  569.         tm_file=a29k/vx29k.h
  570.         ;;
  571.     a29k-*-*)            # Default a29k environment.
  572.         use_collect2=yes
  573.         ;;
  574.     alpha-dec-osf[23456789]*)
  575.         tm_file=alpha/osf2.h
  576.         if [ x$stabs = xyes ]
  577.         then
  578.             tm_file=alpha/gdb-osf2.h
  579.         fi
  580.         if [ x$gas != xyes ]
  581.         then
  582.             extra_passes="mips-tfile mips-tdump"
  583.         fi
  584.         broken_install=yes
  585.         use_collect2=yes
  586.         ;;
  587.     alpha-dec-osf1.2)
  588.         tm_file=alpha/osf12.h
  589.         if [ x$stabs = xyes ]
  590.         then
  591.             tm_file=alpha/gdb-osf12.h
  592.         fi
  593.         if [ x$gas != xyes ]
  594.         then
  595.             extra_passes="mips-tfile mips-tdump"
  596.         fi
  597.         broken_install=yes
  598.         use_collect2=yes
  599.         ;;
  600.     alpha-*-osf*)
  601.         if [ x$stabs = xyes ]
  602.         then
  603.             tm_file=alpha/gdb.h
  604.         fi
  605.         if [ x$gas != xyes ]
  606.         then
  607.             extra_passes="mips-tfile mips-tdump"
  608.         fi
  609.         broken_install=yes
  610.         use_collect2=yes
  611.         ;;
  612.     alpha-*-winnt3*)
  613.         tm_file=alpha/winnt.h
  614.         xm_file=alpha/xm-winnt.h
  615.         tmake_file=t-libc-ok
  616.         xmake_file=alpha/x-winnt
  617.         fixincludes=fixinc.winnt
  618.         if [ x$gnu_ld != xyes ]
  619.         then
  620.             extra_programs=ld
  621.         fi
  622.         ;;
  623.     arm-*-riscix1.[01]*)        # Acorn RISC machine (early versions)
  624.         tm_file=arm/riscix1-1.h
  625.         use_collect2=yes
  626.         ;;
  627.     arm-*-riscix*)            # Acorn RISC machine
  628.         if [ x$gas = xyes ]
  629.         then
  630.             tm_file=arm/rix-gas.h
  631.         else
  632.             tm_file=arm/riscix.h
  633.         fi
  634.         xmake_file=arm/x-riscix
  635.         tmake_file=arm/t-riscix
  636.         use_collect2=yes
  637.         ;;
  638.     arm-semi-aout | armel-semi-aout)
  639.         cpu_type=arm
  640.         tm_file=arm/semi.h
  641.         tmake_file=arm/t-semi
  642.         fixincludes=Makefile.in # There is nothing to fix
  643.         ;;
  644.     arm-*-*)            # generic version
  645.         ;;
  646.     c1-convex-*)            # Convex C1
  647.         cpu_type=convex
  648.         tm_file=convex/convex1.h
  649.         use_collect2=yes
  650.         fixincludes=Makefile.in
  651.         ;;
  652.     c2-convex-*)            # Convex C2
  653.         cpu_type=convex
  654.         tm_file=convex/convex2.h
  655.         use_collect2=yes
  656.         fixincludes=Makefile.in
  657.         ;;
  658.     c32-convex-*)
  659.         cpu_type=convex
  660.         tm_file=convex/convex32.h    # Convex C32xx
  661.         use_collect2=yes
  662.         fixincludes=Makefile.in
  663.         ;;
  664.     c34-convex-*)
  665.         cpu_type=convex
  666.         tm_file=convex/convex34.h    # Convex C34xx
  667.         use_collect2=yes
  668.         fixincludes=Makefile.in
  669.         ;;
  670.     c38-convex-*)
  671.         cpu_type=convex
  672.         tm_file=convex/convex38.h    # Convex C38xx
  673.         use_collect2=yes
  674.         fixincludes=Makefile.in
  675.         ;;
  676.     clipper-intergraph-clix*)
  677.         broken_install=yes
  678.         cpu_type=clipper
  679.         xm_file=clipper/xm-clix.h
  680.         tm_file=clipper/clix.h
  681.         extra_headers=va-clipper.h
  682.         extra_parts="crtbegin.o crtend.o"
  683.         xmake_file=clipper/x-clix
  684.         install_headers_dir=install-headers-cpio
  685.         ;;
  686.     dsp16xx-*)
  687.         ;;
  688.     elxsi-elxsi-*)
  689.         use_collect2=yes
  690.         ;;
  691. # This hasn't been upgraded to GCC 2.
  692. #    fx80-alliant-*)            # Alliant FX/80
  693. #        ;;
  694.     h8300-*-*)
  695.         cpu_type=h8300
  696.         ;;
  697.     hppa1.1-*-osf*)
  698.         cpu_type=pa
  699.         tm_file=pa/pa1-osf.h
  700.         use_collect2=yes
  701.         fixincludes=Makefile.in
  702.         ;;
  703.     hppa1.0-*-osf*)
  704.         cpu_type=pa
  705.         tm_file=pa/pa-osf.h
  706.         use_collect2=yes
  707.         fixincludes=Makefile.in
  708.         ;;
  709.     hppa1.1-*-bsd*)
  710.         cpu_type=pa
  711.         tm_file=pa/pa1.h
  712.         use_collect2=yes
  713.         fixincludes=Makefile.in
  714.         ;;
  715.     hppa1.0-*-bsd*)
  716.         cpu_type=pa
  717.         use_collect2=yes
  718.         fixincludes=Makefile.in
  719.         ;;
  720.     hppa1.0-*-hpux7*)
  721.         cpu_type=pa
  722.         xm_file=pa/xm-pahpux.h
  723.         xmake_file=pa/x-pa-hpux
  724.         tmake_file=pa/t-pa
  725.         if [ x$gas = xyes ]
  726.         then
  727.             tm_file=pa/pa-gux7.h
  728.         else
  729.             tm_file=pa/pa-hpux7.h
  730.         fi
  731.         broken_install=yes
  732.         install_headers_dir=install-headers-cpio
  733.         use_collect2=yes
  734.         ;;
  735.     hppa1.0-*-hpux8.0[0-2]*)
  736.         cpu_type=pa
  737.         xm_file=pa/xm-pahpux.h
  738.         xmake_file=pa/x-pa-hpux
  739.         tmake_file=pa/t-pa
  740.         if [ x$gas = xyes ]
  741.         then
  742.             tm_file=pa/pa-ghpux.h
  743.         else
  744.             tm_file=pa/pa-oldas.h
  745.         fi
  746.         broken_install=yes
  747.         install_headers_dir=install-headers-cpio
  748.         use_collect2=yes
  749.         ;;
  750.     hppa1.1-*-hpux8.0[0-2]*)
  751.         cpu_type=pa
  752.         xm_file=pa/xm-pahpux.h
  753.         xmake_file=pa/x-pa-hpux
  754.         tmake_file=pa/t-pa
  755.         if [ x$gas = xyes ]
  756.         then
  757.             tm_file=pa/pa1-ghpux.h
  758.         else
  759.             tm_file=pa/pa1-oldas.h
  760.         fi
  761.         broken_install=yes
  762.         install_headers_dir=install-headers-cpio
  763.         use_collect2=yes
  764.         ;;
  765.     hppa1.1-*-hpux9*)
  766.         cpu_type=pa
  767.         xm_file=pa/xm-pahpux.h
  768.         xmake_file=pa/x-pa-hpux
  769.         tmake_file=pa/t-pa
  770.         if [ x$gas = xyes ]
  771.         then
  772.             tm_file=pa/pa1-ghpux9.h
  773.         else
  774.             tm_file=pa/pa1-hpux9.h
  775.         fi
  776.         broken_install=yes
  777.         install_headers_dir=install-headers-cpio
  778.         use_collect2=yes
  779.         ;;
  780.     hppa1.0-*-hpux9*)
  781.         cpu_type=pa
  782.         xm_file=pa/xm-pahpux.h
  783.         xmake_file=pa/x-pa-hpux
  784.         tmake_file=pa/t-pa
  785.         if [ x$gas = xyes ]
  786.         then
  787.             tm_file=pa/pa-ghpux9.h
  788.         else
  789.             tm_file=pa/pa-hpux9.h
  790.         fi
  791.         broken_install=yes
  792.         install_headers_dir=install-headers-cpio
  793.         use_collect2=yes
  794.         ;;
  795.     hppa1.1-*-hpux*)
  796.         cpu_type=pa
  797.         xm_file=pa/xm-pahpux.h
  798.         xmake_file=pa/x-pa-hpux
  799.         tmake_file=pa/t-pa
  800.         if [ x$gas = xyes ]
  801.         then
  802.             tm_file=pa/pa1-ghpux.h
  803.         else
  804.             tm_file=pa/pa1-hpux.h
  805.         fi
  806.         broken_install=yes
  807.         install_headers_dir=install-headers-cpio
  808.         use_collect2=yes
  809.         ;;
  810.     hppa1.0-*-hpux*)
  811.         cpu_type=pa
  812.         xm_file=pa/xm-pahpux.h
  813.         xmake_file=pa/x-pa-hpux
  814.         tmake_file=pa/t-pa
  815.         if [ x$gas = xyes ]
  816.         then
  817.             tm_file=pa/pa-ghpux.h
  818.         else
  819.             tm_file=pa/pa-hpux.h
  820.         fi
  821.         broken_install=yes
  822.         install_headers_dir=install-headers-cpio
  823.         use_collect2=yes
  824.         ;;
  825.     hppa1.1-*-hiux*)
  826.         cpu_type=pa
  827.         xm_file=pa/xm-pahpux.h
  828.         xmake_file=pa/x-pa-hpux
  829.         tmake_file=pa/t-pa
  830.         if [ x$gas = xyes ]
  831.         then
  832.             tm_file=pa/pa1-ghiux.h
  833.         else
  834.             tm_file=pa/pa1-hiux.h
  835.         fi
  836.         broken_install=yes
  837.         install_headers_dir=install-headers-cpio
  838.         use_collect2=yes
  839.         ;;
  840.     hppa1.0-*-hiux*)
  841.         cpu_type=pa
  842.         xm_file=pa/xm-pahpux.h
  843.         xmake_file=pa/x-pa-hpux
  844.         tmake_file=pa/t-pa
  845.         if [ x$gas = xyes ]
  846.         then
  847.             tm_file=pa/pa-ghiux.h
  848.         else
  849.             tm_file=pa/pa-hiux.h
  850.         fi
  851.         broken_install=yes
  852.         install_headers_dir=install-headers-cpio
  853.         use_collect2=yes
  854.         ;;
  855.     hppa*-*-lites*)
  856.         cpu_type=pa
  857.         tm_file=pa/pa1.h
  858.         use_collect2=yes
  859.         fixincludes=Makefile.in
  860.         ;;
  861.     i370-*-mvs*)
  862.         cpu_type=i370
  863.         tm_file=i370/mvs.h
  864.         xm_file=i370/xm-mvs.h
  865.         out_file=i370/mvs370.c
  866.         ;;
  867.     i[345]86-ibm-aix*)        # IBM PS/2 running AIX
  868.         cpu_type=i386
  869.                 if [ x$gas = xyes ]
  870.         then
  871.             tm_file=i386/aix386.h
  872.             extra_parts="crtbegin.o crtend.o"
  873.             tmake_file=i386/t-crtstuff
  874.         else
  875.             tm_file=i386/aix386ng.h
  876.             use_collect2=yes
  877.         fi
  878.         xm_file=i386/xm-aix.h
  879.         xmake_file=i386/x-aix
  880.         broken_install=yes
  881.         ;;
  882.     i486-ncr-sysv4*)        # NCR 3000 - i486 running system V.4
  883.         cpu_type=i386
  884.         xm_file=i386/xm-sysv4.h
  885.         xmake_file=i386/x-ncr3000
  886.         tm_file=i386/sysv4.h
  887.         extra_parts="crtbegin.o crtend.o"
  888.         tmake_file=i386/t-crtpic
  889.         ;;
  890.     i[345]86-next-*)
  891.         cpu_type=i386
  892.         tm_file=i386/next.h
  893.         out_file=i386/next.c
  894.         xm_file=i386/xm-next.h
  895.         tmake_file=i386/t-next
  896.         xmake_file=i386/x-next
  897.         ;;
  898.     i[345]86-sequent-bsd*)         # 80386 from Sequent
  899.         cpu_type=i386
  900.         use_collect2=yes
  901.         if [ x$gas = xyes ]
  902.         then
  903.             tm_file=i386/seq-gas.h
  904.         else
  905.             tm_file=i386/sequent.h
  906.         fi
  907.         ;;
  908.     i[345]86-sequent-ptx1*)
  909.         cpu_type=i386
  910.         xm_file=i386/xm-sysv3.h
  911.         xmake_file=i386/x-sysv3
  912.         tm_file=i386/seq-sysv3.h
  913.         tmake_file=i386/t-crtstuff
  914.         fixincludes=fixinc.ptx
  915.         extra_parts="crtbegin.o crtend.o"
  916.         install_headers_dir=install-headers-cpio
  917.         broken_install=yes
  918.         ;;
  919.     i[345]86-sequent-ptx2* | i[345]86-sequent-sysv*)
  920.         cpu_type=i386
  921.         xm_file=i386/xm-sysv3.h
  922.         xmake_file=i386/x-sysv3
  923.         tm_file=i386/seq2-sysv3.h
  924.         tmake_file=i386/t-crtstuff
  925.         extra_parts="crtbegin.o crtend.o"
  926.         fixincludes=fixinc.ptx
  927.         install_headers_dir=install-headers-cpio
  928.         broken_install=yes
  929.         ;;
  930.     i386-sun-sunos*)        # Sun i386 roadrunner
  931.         xm_file=i386/xm-sun.h
  932.         tm_file=i386/sun.h
  933.         use_collect2=yes
  934.         ;;
  935.     i[345]86-*-aout*)
  936.         cpu_type=i386
  937.         tm_file=i386/i386-aout.h
  938.         tmake_file=i386/t-i386bare
  939.         ;;
  940.     i[345]86-*-bsdi* | i[345]86-*-bsd386*)
  941.         cpu_type=i386
  942.         tm_file=i386/bsd386.h
  943.         xm_file=i386/xm-bsd386.h
  944. #        tmake_file=t-libc-ok
  945.         ;;
  946.     i[345]86-*-bsd*)
  947.         cpu_type=i386
  948.         tm_file=i386/386bsd.h
  949.         xm_file=i386/xm-bsd386.h
  950. #        tmake_file=t-libc-ok
  951. # Next line turned off because both 386BSD and BSD/386 use GNU ld.
  952. #        use_collect2=yes
  953.         ;;
  954.     i[345]86-*-freebsd*)
  955.         cpu_type=i386
  956.         tm_file=i386/freebsd.h
  957.         xm_file=i386/xm-freebsd.h
  958.         # On FreeBSD, the headers are already ok.
  959.         fixincludes=Makefile.in
  960.         xmake_file=i386/x-freebsd
  961.         ;;
  962.     i[345]86-*-netbsd*)
  963.         cpu_type=i386
  964.         tm_file=i386/netbsd.h
  965.         xm_file=i386/xm-netbsd.h
  966.         # On NetBSD, the headers are already okay.
  967.         fixincludes=Makefile.in
  968.         tmake_file=t-libc-ok
  969.         xmake_file=x-netbsd
  970.         ;;
  971.     i[345]86-*-coff*)
  972.         cpu_type=i386
  973.         tm_file=i386/i386-coff.h
  974.         tmake_file=i386/t-i386bare
  975.         ;;
  976.     i[345]86-*-gnu*)
  977.         cpu_type=i386    # GNU supports this CPU; rest done below.
  978.         ;;
  979.     i[345]86-*-isc*)        # 80386 running ISC system
  980.         cpu_type=i386
  981.         xm_file=i386/xm-isc.h
  982.         case $machine in
  983.           i[345]86-*-isc[34]*)
  984.             xmake_file=i386/x-isc3
  985.             ;;
  986.           *)
  987.             xmake_file=i386/x-isc
  988.             ;;
  989.         esac
  990.         echo $xmake_file
  991.                 if [ x$gas = xyes -a x$stabs = xyes ]
  992.         then
  993.             tm_file=i386/iscdbx.h
  994.             tmake_file=i386/t-svr3dbx
  995.             extra_parts="crtbegin.o crtend.o svr3.ifile svr3z.rfile"
  996.         else
  997.             tm_file=i386/isccoff.h
  998.             tmake_file=i386/t-crtstuff
  999.             extra_parts="crtbegin.o crtend.o"
  1000.         fi
  1001.         install_headers_dir=install-headers-cpio
  1002.         broken_install=yes
  1003.         ;;
  1004.     i[345]86-*-linux*oldld*)    # Intel 80386's running Linux
  1005.         cpu_type=i386        # with a.out format using pre BFD linkers
  1006.         xm_file=i386/xm-linux.h
  1007.         xmake_file=x-linux
  1008.         tm_file=i386/linux-oldld.h
  1009.         fixincludes=Makefile.in #On Linux, the headers are ok already.
  1010.         broken_install=yes
  1011.         gnu_ld=yes
  1012.         ;;
  1013.     i[345]86-*-linux*aout*)        # Intel 80386's running Linux
  1014.         cpu_type=i386        # with a.out format
  1015.         xm_file=i386/xm-linux.h
  1016.         xmake_file=x-linux
  1017.         tm_file=i386/linux-aout.h
  1018.         fixincludes=Makefile.in #On Linux, the headers are ok already.
  1019.         broken_install=yes
  1020.         gnu_ld=yes
  1021.         ;;
  1022.     i[345]86-*-linux*)        # Intel 80386's running Linux
  1023.         cpu_type=i386        # with ELF format
  1024.         xm_file=i386/xm-linux.h
  1025.         xmake_file=x-linux
  1026.         tm_file=i386/linux.h
  1027.         fixincludes=Makefile.in #On Linux, the headers are ok already.
  1028.         broken_install=yes
  1029.         gnu_ld=yes
  1030.         # Don't use it. Linux uses a slightly different one.
  1031.         # The real one comes with the Linux C library.
  1032.         #extra_parts="crtbegin.o crtend.o"
  1033.         ;;
  1034.       i[345]86-go32-msdos | i[345]86-*-go32)
  1035.               cpu_type=i386
  1036.               tm_file=i386/go32.h
  1037.               ;;
  1038.     i[345]86-*-lynxos*)
  1039.         cpu_type=i386
  1040.         if [ x$gas = xyes ]
  1041.         then
  1042.             tm_file=i386/lynx.h
  1043.         else
  1044.             tm_file=i386/lynx-ng.h
  1045.         fi
  1046.         xm_file=i386/xm-lynx.h
  1047.         tmake_file=i386/t-i386bare
  1048.         xmake_file=x-lynx
  1049.         ;;
  1050.     i[345]86-*-mach*)
  1051.         cpu_type=i386
  1052.         tm_file=i386/mach.h
  1053. #        tmake_file=t-libc-ok
  1054.         use_collect2=yes
  1055.         ;;
  1056.     i[345]86-*-osfrose*)        # 386 using OSF/rose
  1057.         cpu_type=i386
  1058.                 if [ x$elf = xyes ]
  1059.         then
  1060.             tm_file=i386/osfelf.h
  1061.             use_collect2=
  1062.         else
  1063.             tm_file=i386/osfrose.h
  1064.             use_collect2=yes
  1065.         fi
  1066.         xm_file=i386/xm-osf.h
  1067.         xmake_file=i386/x-osfrose
  1068.         extra_objs=halfpic.o
  1069.         ;;
  1070.     i[345]86-*-sco3.2v4*)         # 80386 running SCO 3.2v4 system
  1071.         cpu_type=i386
  1072.         xm_file=i386/xm-sco.h
  1073.         xmake_file=i386/x-sco4
  1074.         fixincludes=fixinc.sco
  1075.         broken_install=yes
  1076.         install_headers_dir=install-headers-cpio
  1077.                 if [ x$stabs = xyes ]
  1078.         then
  1079.             tm_file=i386/sco4dbx.h
  1080.             tmake_file=i386/t-svr3dbx
  1081.             extra_parts="svr3.ifile svr3z.rfile"
  1082.         else
  1083.             tm_file=i386/sco4.h
  1084.             tmake_file=i386/t-crtstuff
  1085.             extra_parts="crtbegin.o crtend.o"
  1086.         fi
  1087.         ;;
  1088.     i[345]86-*-sco*)         # 80386 running SCO system
  1089.         cpu_type=i386
  1090.         xm_file=i386/xm-sco.h
  1091.         xmake_file=i386/x-sco
  1092.         broken_install=yes
  1093.         install_headers_dir=install-headers-cpio
  1094.                 if [ x$stabs = xyes ]
  1095.         then
  1096.             tm_file=i386/scodbx.h
  1097.             tmake_file=i386/t-svr3dbx
  1098.             extra_parts="svr3.ifile svr3z.rfile"
  1099.         else
  1100.             tm_file=i386/sco.h
  1101.             extra_parts="crtbegin.o crtend.o"
  1102.             tmake_file=i386/t-crtstuff
  1103.         fi
  1104.         truncate_target=yes
  1105.         ;;
  1106.     i[345]86-*-solaris2* | i[345]86-*-sunos5*)
  1107.         cpu_type=i386
  1108.         xm_file=i386/xm-sysv4.h
  1109.         tm_file=i386/sol2.h
  1110.         tmake_file=i386/t-sol2
  1111.         extra_parts="crt1.o crti.o crtn.o crtbegin.o crtend.o"
  1112.         xmake_file=x-svr4
  1113.         fixincludes=fixinc.svr4
  1114.         broken_install=yes
  1115.         ;;
  1116.     i[345]86-*-sysv4*)        # Intel 80386's running system V.4
  1117.         cpu_type=i386
  1118.         xm_file=i386/xm-sysv4.h
  1119.         if [ x$stabs = xyes ]
  1120.         then
  1121.             tm_file=i386/sysv4gdb.h
  1122.         else
  1123.             tm_file=i386/sysv4.h
  1124.         fi
  1125.         tmake_file=i386/t-crtpic
  1126.         xmake_file=x-svr4
  1127.         extra_parts="crtbegin.o crtend.o"
  1128.         ;;
  1129.     i[345]86-*-sysv*)        # Intel 80386's running system V
  1130.         cpu_type=i386
  1131.         xm_file=i386/xm-sysv3.h
  1132.         xmake_file=i386/x-sysv3
  1133.         if [ x$gas = xyes ]
  1134.         then
  1135.             if [ x$stabs = xyes ]
  1136.             then
  1137.                 tm_file=i386/svr3dbx.h
  1138.                 tmake_file=i386/t-svr3dbx
  1139.                 extra_parts="svr3.ifile svr3z.rfile"
  1140.             else
  1141.                 tm_file=i386/svr3gas.h
  1142.                 extra_parts="crtbegin.o crtend.o"
  1143.                 tmake_file=i386/t-crtstuff
  1144.             fi
  1145.         else
  1146.             tm_file=i386/sysv3.h
  1147.             extra_parts="crtbegin.o crtend.o"
  1148.             tmake_file=i386/t-crtstuff
  1149.         fi
  1150.         ;;
  1151.     i386-*-vsta)            # Intel 80386's running VSTa kernel
  1152.         xm_file=i386/xm-vsta.h
  1153.         tm_file=i386/vsta.h
  1154.         tmake_file=i386/t-vsta
  1155.         xmake_file=i386/x-vsta
  1156.         ;;
  1157.     i[345]86-*-winnt3*)
  1158.         cpu_type=i386
  1159.         tm_file=i386/winnt.h
  1160.         out_file=i386/i386.c
  1161.         xm_file=i386/xm-winnt.h
  1162.         xmake_file=i386/x-winnt
  1163.         tmake_file=i386/t-winnt
  1164.         extra_objs=winnt.o
  1165.         fixincludes=fixinc.winnt
  1166.         if [ x$gnu_ld != xyes ]
  1167.         then
  1168.             extra_programs=ld
  1169.         fi
  1170.         ;;
  1171.     i860-alliant-*)        # Alliant FX/2800
  1172.         xm_file=i860/xm-fx2800.h
  1173.         xmake_file=i860/x-fx2800
  1174.         tm_file=i860/fx2800.h
  1175.         tmake_file=i860/t-fx2800
  1176.         extra_parts="crtbegin.o crtend.o"
  1177.         ;;
  1178.     i860-*-bsd*)
  1179.         if [ x$gas = xyes ]
  1180.         then
  1181.             tm_file=i860/bsd-gas.h
  1182.         else
  1183.             tm_file=i860/bsd.h
  1184.         fi
  1185.         use_collect2=yes
  1186.         ;;
  1187.     i860-*-mach*)
  1188.         xm_file=i860/xm-i860.h
  1189.         tm_file=i860/mach.h
  1190.         tmake_file=t-libc-ok
  1191.         ;;
  1192.     i860-*-osf*)            # Intel Paragon XP/S, OSF/1AD
  1193.         xm_file=i860/xm-paragon.h
  1194.         tm_file=i860/paragon.h
  1195.         tmake_file=t-osf
  1196.         broken_install=yes
  1197.         ;;
  1198.     i860-*-sysv3*)
  1199.         xm_file=i860/xm-sysv3.h
  1200.         xmake_file=i860/x-sysv3
  1201.         tm_file=i860/sysv3.h
  1202.         extra_parts="crtbegin.o crtend.o"
  1203.         ;;
  1204.     i860-*-sysv4*)
  1205.         xm_file=i860/xm-sysv4.h
  1206.         xmake_file=i860/x-sysv4
  1207.         tm_file=i860/sysv4.h
  1208.         tmake_file=t-svr4
  1209.         extra_parts="crtbegin.o crtend.o"
  1210.         ;;
  1211.     i960-wrs-vxworks5 | i960-wrs-vxworks5.0*)
  1212.         tmake_file=i960/t-vxworks960
  1213.         tm_file=i960/vx960.h
  1214.         use_collect2=yes
  1215.         ;;
  1216.     i960-wrs-vxworks5*)
  1217.         tmake_file=i960/t-vxworks960
  1218.         tm_file=i960/vx960-coff.h
  1219.         use_collect2=yes
  1220.         ;;
  1221.     i960-wrs-vxworks*)
  1222.         tmake_file=i960/t-vxworks960
  1223.         tm_file=i960/vx960.h
  1224.         use_collect2=yes
  1225.         ;;
  1226.     i960-*-coff*)
  1227.         tmake_file=i960/t-960bare
  1228.         tm_file=i960/i960-coff.h
  1229.         use_collect2=yes
  1230.         ;;
  1231.     i960-*-*)            # Default i960 environment.
  1232.         use_collect2=yes
  1233.         ;;
  1234.     m68000-convergent-sysv*)
  1235.         cpu_type=m68k
  1236.         xm_file=m68k/xm-3b1.h
  1237.         tm_file=m68k/ctix.h
  1238.         use_collect2=yes
  1239.         extra_headers=math-68881.h
  1240.         ;;
  1241.     m68000-hp-bsd*)            # HP 9000/200 running BSD
  1242.         cpu_type=m68k
  1243.         tm_file=m68k/hp2bsd.h
  1244.         xmake_file=m68k/x-hp2bsd
  1245.         use_collect2=yes
  1246.         extra_headers=math-68881.h
  1247.         ;;
  1248.     m68000-hp-hpux*)        # HP 9000 series 300
  1249.         cpu_type=m68k
  1250.         xm_file=m68k/xm-hp320.h
  1251.         if [ x$gas = xyes ]
  1252.         then
  1253.             xmake_file=m68k/x-hp320g
  1254.             tm_file=m68k/hp310g.h
  1255.         else
  1256.             xmake_file=m68k/x-hp320
  1257.             tm_file=m68k/hp310.h
  1258.         fi
  1259.         broken_install=yes
  1260.         install_headers_dir=install-headers-cpio
  1261.         use_collect2=yes
  1262.         extra_headers=math-68881.h
  1263.         ;;
  1264.     m68000-sun-sunos3*)
  1265.         cpu_type=m68k
  1266.         tm_file=m68k/sun2.h
  1267.         use_collect2=yes
  1268.         extra_headers=math-68881.h
  1269.         ;;
  1270.     m68000-sun-sunos4*)
  1271.         cpu_type=m68k
  1272.         tm_file=m68k/sun2o4.h
  1273.         use_collect2=yes
  1274.         extra_headers=math-68881.h
  1275.         ;;
  1276.     m68000-att-sysv*)
  1277.         cpu_type=m68k
  1278.         xm_file=m68k/xm-3b1.h
  1279.         if [ x$gas = xyes ]
  1280.         then
  1281.             tm_file=m68k/3b1g.h
  1282.         else
  1283.             tm_file=m68k/3b1.h
  1284.         fi
  1285.         use_collect2=yes
  1286.         extra_headers=math-68881.h
  1287.         ;;
  1288.     m68k-apollo-*)
  1289.         xmake_file=m68k/x-apollo68
  1290.         tm_file=m68k/apollo68.h
  1291.         use_collect2=yes
  1292.         extra_headers=math-68881.h
  1293.         ;;
  1294.     m68k-altos-sysv*)           # Altos 3068
  1295.         if [ x$gas = xyes ]
  1296.         then
  1297.                 xm_file=m68k/xm-altos3068.h
  1298.                 tm_file=m68k/altos3068.h
  1299.         else
  1300.             echo "The Altos is supported only with the GNU assembler" 1>&2
  1301.             exit 1
  1302.         fi
  1303.         extra_headers=math-68881.h
  1304.             ;;
  1305.     m68k-bull-sysv*)        # Bull DPX/2
  1306.         if [ x$gas = xyes ]
  1307.         then
  1308.             if [ x$stabs = xyes ]
  1309.             then
  1310.                 tm_file=m68k/dpx2cdbx.h
  1311.             else
  1312.                 tm_file=m68k/dpx2g.h
  1313.             fi
  1314.         else
  1315.             tm_file=m68k/dpx2.h
  1316.         fi
  1317.         xm_file=m68k/xm-m68kv.h
  1318.         xmake_file=m68k/x-dpx2
  1319.         use_collect2=yes
  1320.         extra_headers=math-68881.h
  1321.         ;;
  1322.     m68k-atari-sysv4*)              # Atari variant of V.4.
  1323.         tm_file=m68k/atari.h
  1324.         xm_file=m68k/xm-atari.h
  1325.         tmake_file=t-svr4
  1326.         extra_parts="crtbegin.o crtend.o"
  1327.         extra_headers=math-68881.h
  1328.         ;;
  1329.     m68k-motorola-sysv*)
  1330.         xm_file=m68k/xm-mot3300.h
  1331.         xmake_file=m68k/x-mot3300
  1332.         if [ x$gas = xyes ]
  1333.         then
  1334.             tm_file=m68k/mot3300g.h
  1335.         else
  1336.             tm_file=m68k/mot3300.h
  1337.             gdb_needs_out_file_path=yes
  1338.         fi
  1339.         use_collect2=yes
  1340.         extra_headers=math-68881.h
  1341.         ;;
  1342.     m68k-ncr-sysv*)            # NCR Tower 32 SVR3
  1343.         tm_file=m68k/tower-as.h
  1344.         xm_file=m68k/xm-tower.h
  1345.         xmake_file=m68k/x-tower
  1346.         extra_parts="crtbegin.o crtend.o"
  1347.         extra_headers=math-68881.h
  1348.         ;;
  1349.         m68k-plexus-sysv*)
  1350.         tm_file=m68k/plexus.h
  1351.         xm_file=m68k/xm-plexus.h
  1352.         use_collect2=yes
  1353.         extra_headers=math-68881.h
  1354.         ;;
  1355.     m68k-tti-*)
  1356.         tm_file=m68k/pbb.h
  1357.         xm_file=m68k/xm-m68kv.h
  1358.         extra_headers=math-68881.h
  1359.         ;;
  1360.     m68k-crds-unos*)
  1361.         xm_file=m68k/xm-crds.h
  1362.         xmake_file=m68k/x-crds
  1363.         tm_file=m68k/crds.h
  1364.         broken_install=yes
  1365.         use_collect2=yes
  1366.         extra_headers=math-68881.h
  1367.         ;;
  1368.     m68k-cbm-sysv4*)        # Commodore variant of V.4.
  1369.         tm_file=m68k/amix.h
  1370.         xm_file=m68k/xm-amix.h
  1371.         xmake_file=m68k/x-amix
  1372.         tmake_file=t-svr4
  1373.         extra_parts="crtbegin.o crtend.o"
  1374.         extra_headers=math-68881.h
  1375.         ;;
  1376.     m68k-ccur-rtu)
  1377.         tm_file=m68k/ccur-GAS.h
  1378.         xmake_file=m68k/x-ccur
  1379.         extra_headers=math-68881.h
  1380.         use_collect2=yes
  1381.         broken_install=yes
  1382.         ;;
  1383.     m68k-hp-bsd4.4*)        # HP 9000/3xx running 4.4bsd
  1384.         tm_file=m68k/hp3bsd44.h
  1385.         xmake_file=m68k/x-hp3bsd44
  1386.         use_collect2=yes
  1387.         extra_headers=math-68881.h
  1388.         ;;
  1389.     m68k-hp-bsd*)            # HP 9000/3xx running Berkeley Unix
  1390.         tm_file=m68k/hp3bsd.h
  1391.         use_collect2=yes
  1392.         extra_headers=math-68881.h
  1393.         ;;
  1394.     m68k-isi-bsd*)
  1395.         if [ x$nfp = xyes ]
  1396.         then
  1397.             tm_file=m68k/isi-nfp.h
  1398.         else
  1399.             tm_file=m68k/isi.h
  1400.         fi
  1401.         use_collect2=yes
  1402.         extra_headers=math-68881.h
  1403.         ;;
  1404.     m68k-hp-hpux7*)    # HP 9000 series 300 running HPUX version 7.
  1405.         xm_file=m68k/xm-hp320.h
  1406.         if [ x$gas = xyes ]
  1407.         then
  1408.             xmake_file=m68k/x-hp320g
  1409.             tm_file=m68k/hp320g.h
  1410.         else
  1411.             xmake_file=m68k/x-hp320
  1412.             tm_file=m68k/hpux7.h
  1413.         fi
  1414.         broken_install=yes
  1415.         install_headers_dir=install-headers-cpio
  1416.         use_collect2=yes
  1417.         extra_headers=math-68881.h
  1418.         ;;
  1419.     m68k-hp-hpux*)    # HP 9000 series 300
  1420.         xm_file=m68k/xm-hp320.h
  1421.         if [ x$gas = xyes ]
  1422.         then
  1423.             xmake_file=m68k/x-hp320g
  1424.             tm_file=m68k/hp320g.h
  1425.         else
  1426.             xmake_file=m68k/x-hp320
  1427.             tm_file=m68k/hp320.h
  1428.         fi
  1429.         broken_install=yes
  1430.         install_headers_dir=install-headers-cpio
  1431.         use_collect2=yes
  1432.         extra_headers=math-68881.h
  1433.         ;;
  1434.     m68k-sun-mach*)
  1435.         tm_file=m68k/sun3mach.h
  1436.         use_collect2=yes
  1437.         extra_headers=math-68881.h
  1438.         ;;
  1439.     m68k-sony-newsos3*)
  1440.         if [ x$gas = xyes ]
  1441.         then
  1442.             tm_file=m68k/news3gas.h
  1443.         else
  1444.             tm_file=m68k/news3.h
  1445.         fi
  1446.         use_collect2=yes
  1447.         extra_headers=math-68881.h
  1448.         ;;
  1449.     m68k-sony-bsd* | m68k-sony-newsos*)
  1450.         if [ x$gas = xyes ]
  1451.         then
  1452.             tm_file=m68k/newsgas.h
  1453.         else
  1454.             tm_file=m68k/news.h
  1455.         fi
  1456.         use_collect2=yes
  1457.         extra_headers=math-68881.h
  1458.         ;;
  1459.     m68k-next-nextstep2*)
  1460.         tm_file=m68k/next21.h
  1461.         out_file=m68k/next.c
  1462.         xm_file=m68k/xm-next.h
  1463.         tmake_file=m68k/t-next
  1464.         xmake_file=m68k/x-next
  1465.         extra_headers=math-68881.h
  1466.         use_collect2=yes
  1467.                 ;;
  1468.     m68k-next-nextstep3*)
  1469.         tm_file=m68k/next.h
  1470.         out_file=m68k/next.c
  1471.         xm_file=m68k/xm-next.h
  1472.         tmake_file=m68k/t-next
  1473.         xmake_file=m68k/x-next
  1474.         extra_headers=math-68881.h
  1475.         ;;
  1476.     m68k-sun-sunos3*)
  1477.         if [ x$nfp = xyes ]
  1478.         then
  1479.             tm_file=m68k/sun3n3.h
  1480.         else
  1481.             tm_file=m68k/sun3o3.h
  1482.         fi
  1483.         use_collect2=yes
  1484.         extra_headers=math-68881.h
  1485.         ;;
  1486.     m68k-sun-sunos*)            # For SunOS 4 (the default).
  1487.         if [ x$nfp = xyes ]
  1488.         then
  1489.             tm_file=m68k/sun3n.h
  1490.         else
  1491.             tm_file=m68k/sun3.h
  1492.         fi
  1493.         use_collect2=yes
  1494.         extra_headers=math-68881.h
  1495.         ;;
  1496.     m68k-*-amigados)
  1497.         xm_file=m68k/xm-amigados.h
  1498.         out_file=m68k/amigados.c
  1499.         tm_file=m68k/amigados.h
  1500.         tmake_file=m68k/t-amigados
  1501.         xmake_file=m68k/x-amigados
  1502.         fixincludes=Makefile.in # Headers are already fixed.
  1503.         broken_install=cp
  1504.         install_headers_dir=install-headers-cp
  1505.         ;;
  1506.     m68k-wrs-vxworks*)
  1507.         tm_file=m68k/vxm68k.h
  1508.         tmake_file=m68k/t-vxworks68
  1509.         extra_headers=math-68881.h
  1510.         ;;
  1511.     m68k-*-aout*)
  1512.         tmake_file=m68k/t-m68kbare
  1513.         tm_file=m68k/m68k-aout.h
  1514.         extra_headers=math-68881.h
  1515.         ;;
  1516.     m68k-*-coff*)
  1517.         tmake_file=m68k/t-m68kbare
  1518.         tm_file=m68k/m68k-coff.h
  1519.         extra_headers=math-68881.h
  1520.         ;;
  1521.     m68k-*-lynxos*)
  1522.         if [ x$gas = xyes ]
  1523.         then
  1524.             tm_file=m68k/lynx.h
  1525.         else
  1526.             tm_file=m68k/lynx-ng.h
  1527.         fi
  1528.         xm_file=m68k/xm-lynx.h
  1529.         xmake_file=x-lynx
  1530.         tmake_file=m68k/t-lynx
  1531.         extra_headers=math-68881.h
  1532.         ;;
  1533.     m68k-*-netbsd*)
  1534.         cpu_type=m68k
  1535.         tm_file=m68k/netbsd.h
  1536.         xm_file=m68k/xm-netbsd.h
  1537.         # On NetBSD, the headers are already okay.
  1538.         fixincludes=Makefile.in
  1539.         tmake_file=t-libc-ok
  1540.         xmake_file=x-netbsd
  1541.         ;;
  1542.     m68k-*-sysv3*)            # Motorola m68k's running system V.3
  1543.         xm_file=m68k/xm-m68kv.h
  1544.         xmake_file=m68k/x-m68kv
  1545.         extra_parts="crtbegin.o crtend.o"
  1546.         extra_headers=math-68881.h
  1547.         ;;
  1548.     m68k-*-sysv4*)            # Motorola m68k's running system V.4
  1549.         tm_file=m68k/m68kv4.h
  1550.         xm_file=m68k/xm-m68kv.h
  1551.         tmake_file=t-svr4
  1552.         extra_parts="crtbegin.o crtend.o"
  1553.         extra_headers=math-68881.h
  1554.         ;;
  1555.     m88k-dg-dgux*)
  1556.         case $machine in
  1557.           m88k-dg-dguxbcs*)
  1558.             tm_file=m88k/dguxbcs.h
  1559.             xmake_file=m88k/x-dguxbcs
  1560.             ;;
  1561.           *)
  1562.             tm_file=m88k/dgux.h
  1563.             xmake_file=m88k/x-dgux
  1564.             ;;
  1565.         esac
  1566.         extra_parts="crtbegin.o bcscrtbegin.o crtend.o m88kdgux.ld"
  1567.         broken_install=yes
  1568.         if [ x$gas = xyes ]
  1569.         then
  1570.             tmake_file=m88k/t-dgux-gas
  1571.         else
  1572.             tmake_file=m88k/t-dgux
  1573.         fi
  1574.         fixincludes=fixinc.dgux
  1575.         ;;
  1576.     m88k-dolphin-sysv3*)
  1577.         tm_file=m88k/dolph.h
  1578.         extra_parts="crtbegin.o crtend.o"
  1579.         xm_file=m88k/xm-sysv3.h
  1580.         xmake_file=m88k/x-dolph
  1581.         if [ x$gas = xyes ]
  1582.         then
  1583.             tmake_file=m88k/t-m88k-gas
  1584.         fi
  1585.         ;;
  1586.     m88k-tektronix-sysv3)
  1587.         tm_file=m88k/tekXD88.h
  1588.         extra_parts="crtbegin.o crtend.o"
  1589.         xm_file=m88k/xm-sysv3.h
  1590.         xmake_file=m88k/x-tekXD88
  1591.         if [ x$gas = xyes ]
  1592.         then
  1593.             tmake_file=m88k/t-m88k-gas
  1594.         fi
  1595.         ;;
  1596.     m88k-*-aout*)
  1597.         cpu_type=m88k
  1598.         tm_file=m88k/m88k-aout.h
  1599.         ;;
  1600.     m88k-*-coff*)
  1601.         cpu_type=m88k
  1602.         tm_file=m88k/m88k-coff.h
  1603.         tmake_file=m88k/t-bug
  1604.         ;;
  1605.     m88k-*-luna*)
  1606.         tm_file=m88k/luna.h
  1607.         extra_parts="crtbegin.o crtend.o"
  1608.         if [ x$gas = xyes ]
  1609.         then
  1610.             tmake_file=m88k/t-luna-gas
  1611.         else
  1612.             tmake_file=m88k/t-luna
  1613.         fi
  1614.         ;;
  1615.     m88k-*-sysv3*)
  1616.         tm_file=m88k/sysv3.h
  1617.         extra_parts="crtbegin.o crtend.o"
  1618.         xm_file=m88k/xm-sysv3.h
  1619.         xmake_file=m88k/x-sysv3
  1620.         if [ x$gas = xyes ]
  1621.         then
  1622.             tmake_file=m88k/t-m88k-gas
  1623.         fi
  1624.         ;;
  1625.     m88k-*-sysv4*)
  1626.         tm_file=m88k/sysv4.h
  1627.         extra_parts="crtbegin.o crtend.o"
  1628.         xmake_file=m88k/x-sysv4
  1629.         tmake_file=m88k/t-sysv4
  1630.         ;;
  1631.     mips-sgi-irix6*)        # SGI System V.4., IRIX 6
  1632.         tm_file=mips/iris6.h
  1633.         xm_file=mips/xm-iris6.h
  1634.         broken_install=yes
  1635.         fixincludes=Makefile.in
  1636.         xmake_file=mips/x-iris6
  1637.         tmake_file=mips/t-iris6
  1638.         ;;
  1639.     mips-sgi-irix5cross64)        # Irix5 host, Irix 6 target, cross64
  1640.         tm_file=mips/cross64.h
  1641.         xm_file=mips/xm-iris5.h
  1642.         broken_install=yes
  1643.         fixincludes=Makefile.in
  1644.         xmake_file=mips/x-iris
  1645.         tmake_file=mips/t-cross64
  1646.         ;;
  1647.     mips-sgi-irix5*)        # SGI System V.4., IRIX 5
  1648.         if [ x$gas = xyes ]
  1649.         then
  1650.             if [ x$stabs = xyes ]
  1651.             then
  1652.                 tm_file=mips/iris5gdb.h
  1653.             else
  1654.                 tm_file=mips/iris5gas.h
  1655.             fi
  1656.         else
  1657.             tm_file=mips/iris5.h
  1658.         fi
  1659.         xm_file=mips/xm-iris5.h
  1660.         broken_install=yes
  1661.         fixincludes=Makefile.in
  1662.         xmake_file=mips/x-iris
  1663.         # mips-tfile doesn't work yet
  1664.         tmake_file=mips/t-mips-gas
  1665.         # See comment in mips/iris5.h file.
  1666.         use_collect2=yes
  1667.         ;;
  1668.     mips-sgi-irix4loser*)        # Mostly like a MIPS.
  1669.         if [ x$stabs = xyes ]; then
  1670.             tm_file=mips/iris4gl.h
  1671.         else
  1672.             tm_file=mips/iris4loser.h
  1673.         fi
  1674.         xm_file=mips/xm-iris4.h
  1675.         broken_install=yes
  1676.         xmake_file=mips/x-iris
  1677.         if [ x$gas = xyes ]
  1678.         then
  1679.             tmake_file=mips/t-mips-gas
  1680.         else
  1681.             extra_passes="mips-tfile mips-tdump"
  1682.         fi
  1683.         if [ x$gnu_ld != xyes ]
  1684.         then
  1685.             use_collect2=yes
  1686.         fi
  1687.         ;;
  1688.     mips-sgi-irix4*)        # Mostly like a MIPS.
  1689.         if [ x$stabs = xyes ]; then
  1690.             tm_file=mips/iris4-gdb.h
  1691.         else
  1692.             tm_file=mips/iris4.h
  1693.         fi
  1694.         xm_file=mips/xm-iris4.h
  1695.         broken_install=yes
  1696.         xmake_file=mips/x-iris
  1697.         if [ x$gas = xyes ]
  1698.         then
  1699.             tmake_file=mips/t-mips-gas
  1700.         else
  1701.             extra_passes="mips-tfile mips-tdump"
  1702.         fi
  1703.         if [ x$gnu_ld != xyes ]
  1704.         then
  1705.             use_collect2=yes
  1706.         fi
  1707.         ;;
  1708.     mips-sgi-*)            # Mostly like a MIPS.
  1709.         if [ x$stabs = xyes ]; then
  1710.             tm_file=mips/iris3-gdb.h
  1711.         else
  1712.             tm_file=mips/iris3.h
  1713.         fi
  1714.         xm_file=mips/xm-iris3.h
  1715.         broken_install=yes
  1716.         xmake_file=mips/x-iris3
  1717.         if [ x$gas = xyes ]
  1718.         then
  1719.             tmake_file=mips/t-mips-gas
  1720.         else
  1721.             extra_passes="mips-tfile mips-tdump"
  1722.         fi
  1723.         if [ x$gnu_ld != xyes ]
  1724.         then
  1725.             use_collect2=yes
  1726.         fi
  1727.         ;;
  1728.     mips-dec-osfrose*)        # Decstation running OSF/1 reference port with OSF/rose.
  1729.         tm_file=mips/osfrose.h
  1730.         xmake_file=mips/x-osfrose
  1731.         tmake_file=mips/t-osfrose
  1732.         extra_objs=halfpic.o
  1733.         use_collect2=yes
  1734.         ;;
  1735.     mips-dec-osf*)            # Decstation running OSF/1 as shipped by DIGITAL
  1736.         if [ x$stabs = xyes ]; then
  1737.             tm_file=mips/dec-gosf1.h
  1738.         else
  1739.             tm_file=mips/dec-osf1.h
  1740.         fi
  1741.         xmake_file=mips/x-dec-osf1
  1742.         if [ x$gas = xyes ]
  1743.         then
  1744.             tmake_file=mips/t-mips-gas
  1745.         else
  1746.             tmake_file=mips/t-ultrix
  1747.             extra_passes="mips-tfile mips-tdump"
  1748.         fi
  1749.         if [ x$gnu_ld != xyes ]
  1750.         then
  1751.             use_collect2=yes
  1752.         fi
  1753.         ;;
  1754.     mips-dec-bsd*)                  # Decstation running 4.4 BSD
  1755.               tm_file=mips/dec-bsd.h
  1756.               xmake_file=
  1757.               tmake_file=
  1758.               fixincludes=
  1759.           if [ x$gas = xyes ]
  1760.           then
  1761.                tmake_file=mips/t-mips-gas
  1762.           else
  1763.             tmake_file=mips/t-ultrix
  1764.             extra_passes="mips-tfile mips-tdump"
  1765.           fi
  1766.           if [ x$gnu_ld != xyes ]
  1767.           then
  1768.             use_collect2=yes
  1769.           fi
  1770.           ;;
  1771.     mips-dec-netbsd*)                  # Decstation running NetBSD
  1772.         tm_file=mips/netbsd.h
  1773.         xm_file=mips/xm-netbsd.h
  1774.         xmake_file=x-netbsd
  1775.         tmake_file=t-libc-ok
  1776.         fixincludes=Makefile.in
  1777.         prefix=$native_prefix
  1778.         ;;
  1779.     mips-sony-bsd* | mips-sony-newsos*)    # Sony NEWS 3600 or risc/news.
  1780.         if [ x$stabs = xyes ]; then
  1781.             tm_file=mips/news4-gdb.h
  1782.         else
  1783.             tm_file=mips/news4.h
  1784.         fi
  1785.         if [ x$gas = xyes ]
  1786.         then
  1787.             tmake_file=mips/t-mips-gas
  1788.         else
  1789.             extra_passes="mips-tfile mips-tdump"
  1790.         fi
  1791.         if [ x$gnu_ld != xyes ]
  1792.         then
  1793.             use_collect2=yes
  1794.         fi
  1795.         xmake_file=mips/x-sony
  1796.         ;;
  1797.     mips-sony-sysv*)        # Sony NEWS 3800 with NEWSOS5.0.
  1798.                     # That is based on svr4.
  1799.         # t-svr4 is not right because this system doesn't use ELF.
  1800.         if [ x$stabs = xyes ]; then
  1801.             tm_file=mips/news5-gdb.h
  1802.         else
  1803.             tm_file=mips/news5.h
  1804.         fi
  1805.         xm_file=mips/xm-news.h
  1806.         if [ x$gas = xyes ]
  1807.         then
  1808.             tmake_file=mips/t-mips-gas
  1809.         else
  1810.             extra_passes="mips-tfile mips-tdump"
  1811.         fi
  1812.         if [ x$gnu_ld != xyes ]
  1813.         then
  1814.             use_collect2=yes
  1815.         fi
  1816.         ;;
  1817.     mips-tandem-sysv4*)        # Tandem S2 running NonStop UX
  1818.         if [ x$stabs = xyes ]; then
  1819.             tm_file=mips/svr4-t-gdb.h
  1820.         else
  1821.             tm_file=mips/svr4-t.h
  1822.         fi
  1823.         xm_file=mips/xm-sysv4.h
  1824.         xmake_file=mips/x-sysv
  1825.         if [ x$gas = xyes ]
  1826.         then
  1827.             tmake_file=mips/t-mips-gas
  1828.             extra_parts="crtbegin.o crtend.o"
  1829.         else
  1830.             tmake_file=mips/t-mips
  1831.             extra_passes="mips-tfile mips-tdump"
  1832.         fi
  1833.         if [ x$gnu_ld != xyes ]
  1834.         then
  1835.             use_collect2=yes
  1836.         fi
  1837.         broken_install=yes
  1838.         ;;
  1839.     mips-*-ultrix* | mips-dec-mach3)    # Decstation.
  1840.         if [ x$stabs = xyes ]; then
  1841.             tm_file=mips/ultrix-gdb.h
  1842.         else
  1843.             tm_file=mips/ultrix.h
  1844.         fi
  1845.         xmake_file=mips/x-ultrix
  1846.         if [ x$gas = xyes ]
  1847.         then
  1848.             tmake_file=mips/t-mips-gas
  1849.         else
  1850.             tmake_file=mips/t-ultrix
  1851.             extra_passes="mips-tfile mips-tdump"
  1852.         fi
  1853.         if [ x$gnu_ld != xyes ]
  1854.         then
  1855.             use_collect2=yes
  1856.         fi
  1857.             ;;
  1858.     mips-*-riscos[56789]bsd*)
  1859.         if [ x$stabs = xyes ]; then    # MIPS BSD 4.3, RISC-OS 5.0
  1860.             tm_file=mips/bsd-5-gdb.h
  1861.         else
  1862.             tm_file=mips/bsd-5.h
  1863.         fi
  1864.         if [ x$gas = xyes ]
  1865.         then
  1866.             tmake_file=mips/t-bsd-gas
  1867.         else
  1868.             tmake_file=mips/t-bsd
  1869.             extra_passes="mips-tfile mips-tdump"
  1870.         fi
  1871.         if [ x$gnu_ld != xyes ]
  1872.         then
  1873.             use_collect2=yes
  1874.         fi
  1875.         broken_install=yes
  1876.             ;;
  1877.     mips-*-bsd* | mips-*-riscosbsd* | mips-*-riscos[1234]bsd*)
  1878.         if [ x$stabs = xyes ]; then    # MIPS BSD 4.3, RISC-OS 4.0
  1879.             tm_file=mips/bsd-4-gdb.h
  1880.         else
  1881.             tm_file=mips/bsd-4.h
  1882.         fi
  1883.         if [ x$gas = xyes ]
  1884.         then
  1885.             tmake_file=mips/t-bsd-gas
  1886.         else
  1887.             tmake_file=mips/t-bsd
  1888.             extra_passes="mips-tfile mips-tdump"
  1889.         fi
  1890.         if [ x$gnu_ld != xyes ]
  1891.         then
  1892.             use_collect2=yes
  1893.         fi
  1894.         broken_install=yes
  1895.             ;;
  1896.     mips-*-riscos[56789]sysv4*)
  1897.         if [ x$stabs = xyes ]; then    # MIPS System V.4., RISC-OS 5.0
  1898.             tm_file=mips/svr4-5-gdb.h
  1899.         else
  1900.             tm_file=mips/svr4-5.h
  1901.         fi
  1902.         xm_file=mips/xm-sysv4.h
  1903.         xmake_file=mips/x-sysv
  1904.         if [ x$gas = xyes ]
  1905.         then
  1906.             tmake_file=mips/t-svr4-gas
  1907.         else
  1908.             tmake_file=mips/t-svr4
  1909.             extra_passes="mips-tfile mips-tdump"
  1910.         fi
  1911.         if [ x$gnu_ld != xyes ]
  1912.         then
  1913.             use_collect2=yes
  1914.         fi
  1915.         broken_install=yes
  1916.         ;;
  1917.     mips-*-sysv4* | mips-*-riscos[1234]sysv4* | mips-*-riscossysv4*)
  1918.         if [ x$stabs = xyes ]; then    # MIPS System V.4. RISC-OS 4.0
  1919.             tm_file=mips/svr4-4-gdb.h
  1920.         else
  1921.             tm_file=mips/svr4-4.h
  1922.         fi
  1923.         xm_file=mips/xm-sysv.h
  1924.         xmake_file=mips/x-sysv
  1925.         if [ x$gas = xyes ]
  1926.         then
  1927.             tmake_file=mips/t-svr4-gas
  1928.         else
  1929.             tmake_file=mips/t-svr4
  1930.             extra_passes="mips-tfile mips-tdump"
  1931.         fi
  1932.         if [ x$gnu_ld != xyes ]
  1933.         then
  1934.             use_collect2=yes
  1935.         fi
  1936.         broken_install=yes
  1937.         ;;
  1938.     mips-*-riscos[56789]sysv*)
  1939.         if [ x$stabs = xyes ]; then    # MIPS System V.3, RISC-OS 5.0
  1940.             tm_file=mips/svr3-5-gdb.h
  1941.         else
  1942.             tm_file=mips/svr3-5.h
  1943.         fi
  1944.         xm_file=mips/xm-sysv.h
  1945.         xmake_file=mips/x-sysv
  1946.         if [ x$gas = xyes ]
  1947.         then
  1948.             tmake_file=mips/t-svr3-gas
  1949.         else
  1950.             tmake_file=mips/t-svr3
  1951.             extra_passes="mips-tfile mips-tdump"
  1952.         fi
  1953.         if [ x$gnu_ld != xyes ]
  1954.         then
  1955.             use_collect2=yes
  1956.         fi
  1957.         broken_install=yes
  1958.         ;;
  1959.     mips-*-sysv* | mips-*-riscos*sysv*)
  1960.         if [ x$stabs = xyes ]; then    # MIPS System V.3, RISC-OS 4.0
  1961.             tm_file=mips/svr3-4-gdb.h
  1962.         else
  1963.             tm_file=mips/svr3-4.h
  1964.         fi
  1965.         xm_file=mips/xm-sysv.h
  1966.         xmake_file=mips/x-sysv
  1967.         if [ x$gas = xyes ]
  1968.         then
  1969.             tmake_file=mips/t-svr3-gas
  1970.         else
  1971.             tmake_file=mips/t-svr3
  1972.             extra_passes="mips-tfile mips-tdump"
  1973.         fi
  1974.         if [ x$gnu_ld != xyes ]
  1975.         then
  1976.             use_collect2=yes
  1977.         fi
  1978.         broken_install=yes
  1979.         ;;
  1980.     mips-*-riscos[56789]*)            # Default MIPS RISC-OS 5.0.
  1981.         if [ x$stabs = xyes ]; then
  1982.             tm_file=mips/mips-5-gdb.h
  1983.         else
  1984.             tm_file=mips/mips-5.h
  1985.         fi
  1986.         if [ x$gas = xyes ]
  1987.         then
  1988.             tmake_file=mips/t-mips-gas
  1989.         else
  1990.             extra_passes="mips-tfile mips-tdump"
  1991.         fi
  1992.         if [ x$gnu_ld != xyes ]
  1993.         then
  1994.             use_collect2=yes
  1995.         fi
  1996.         broken_install=yes
  1997.         ;;
  1998.     mips-*-gnu*)
  1999.         cpu_type=mips    # GNU supports this CPU; rest done below.
  2000.         ;;
  2001.     mipsel-*-ecoff*)
  2002.         cpu_type=mips
  2003.         if [ x$stabs = xyes ]; then
  2004.             tm_file=mips/ecoffl-gdb.h
  2005.         else
  2006.             tm_file=mips/ecoffl.h
  2007.         fi
  2008.         tmake_file=mips/t-ecoff
  2009.         ;;
  2010.     mips-*-ecoff*)
  2011.         if [ x$stabs = xyes ]; then
  2012.             tm_file=mips/ecoff-gdb.h
  2013.         else
  2014.             tm_file=mips/ecoff.h
  2015.         fi
  2016.         tmake_file=mips/t-ecoff
  2017.         broken_install=yes
  2018.         ;;
  2019.     mipsel-*-elf*)
  2020.         cpu_type=mips
  2021.         tm_file=mips/elfl.h
  2022.         tmake_file=mips/t-ecoff
  2023.         ;;
  2024.     mips-*-elf*)
  2025.         cpu_type=mips
  2026.         tm_file=mips/elf.h
  2027.         tmake_file=mips/t-ecoff
  2028.         ;;
  2029.     mips64el-*-elf*)
  2030.         cpu_type=mips
  2031.         tm_file=mips/elfl64.h
  2032.         tmake_file=mips/t-ecoff
  2033.         ;;
  2034.     mips64orionel-*-elf*)
  2035.         cpu_type=mips
  2036.         tm_file=mips/elflorion.h
  2037.         tmake_file=mips/t-ecoff
  2038.         ;;
  2039.     mips64-*-elf*)
  2040.         cpu_type=mips
  2041.         tm_file=mips/elf64.h
  2042.         tmake_file=mips/t-ecoff
  2043.         ;;
  2044.     mips64orion-*-elf*)
  2045.         cpu_type=mips
  2046.         tm_file=mips/elforion.h
  2047.         tmake_file=mips/t-ecoff
  2048.         ;;
  2049.     mips-*-*)                # Default MIPS RISC-OS 4.0.
  2050.         if [ x$stabs = xyes ]; then
  2051.             tm_file=mips/mips-4-gdb.h
  2052.         else
  2053.             tm_file=mips/mips.h
  2054.         fi
  2055.         if [ x$gas = xyes ]
  2056.         then
  2057.             tmake_file=mips/t-mips-gas
  2058.         else
  2059.             extra_passes="mips-tfile mips-tdump"
  2060.         fi
  2061.         if [ x$gnu_ld != xyes ]
  2062.         then
  2063.             use_collect2=yes
  2064.         fi
  2065.         ;;
  2066.     ns32k-encore-bsd*)
  2067.         tm_file=ns32k/encore.h
  2068.         use_collect2=yes
  2069.         ;;
  2070.     ns32k-sequent-bsd*)
  2071.         tm_file=ns32k/sequent.h
  2072.         use_collect2=yes
  2073.         ;;
  2074.     ns32k-tek6100-bsd*)
  2075.         tm_file=ns32k/tek6100.h
  2076.         broken_install=yes
  2077.         use_collect2=yes
  2078.         ;;
  2079.     ns32k-tek6200-bsd*)
  2080.         tm_file=ns32k/tek6200.h
  2081.         broken_install=yes
  2082.         use_collect2=yes
  2083.         ;;
  2084. # This has not been updated to GCC 2.
  2085. #    ns32k-ns-genix*)
  2086. #        xm_file=ns32k/xm-genix.h
  2087. #        xmake_file=ns32k/x-genix
  2088. #        tm_file=ns32k/genix.h
  2089. #        broken_install=yes
  2090. #        use_collect2=yes
  2091. #        ;;
  2092.     ns32k-merlin-*)
  2093.         tm_file=ns32k/merlin.h
  2094.         use_collect2=yes
  2095.         ;;
  2096.     ns32k-pc532-mach*)
  2097.         tm_file=ns32k/pc532-mach.h
  2098.         use_collect2=yes
  2099.         ;;
  2100.     ns32k-pc532-minix*)
  2101.         tm_file=ns32k/pc532-min.h
  2102.         xm_file=ns32k/xm-pc532-min.h
  2103.         use_collect2=yes
  2104.         ;;
  2105.     ns32k-pc532-netbsd*)
  2106.         tm_file=ns32k/netbsd.h
  2107.         xm_file=ns32k/xm-netbsd.h
  2108.         tmake_file=t-libc-ok
  2109.         # On NetBSD, the headers are already okay.
  2110.         fixincludes=Makefile.in
  2111.         xmake_file=x-netbsd
  2112.         ;;
  2113.     pyramid-*-*)
  2114.         cpu_type=pyr
  2115.         xmake_file=pyr/x-pyr
  2116.         use_collect2=yes
  2117.         ;;
  2118.     romp-*-aos*)
  2119.         use_collect2=yes
  2120.         ;;
  2121.     romp-*-mach*)
  2122.         xmake_file=romp/x-mach
  2123.         use_collect2=yes
  2124.         ;;
  2125.     powerpc-ibm-aix[456789].*)
  2126.         cpu_type=rs6000
  2127.         tm_file=rs6000/aix41ppc.h
  2128.         tmake_file=rs6000/t-rs6000
  2129.         use_collect2=yes
  2130.         ;;
  2131.     powerpc-ibm-aix*)
  2132.         cpu_type=rs6000
  2133.         tm_file=rs6000/powerpc.h
  2134.         tmake_file=rs6000/t-rs6000
  2135.         use_collect2=yes
  2136.         ;;
  2137.     powerpc-*-sysv4* | powerpc-*-elf*)
  2138.         cpu_type=rs6000
  2139.         xm_file=rs6000/xm-sysv4.h
  2140.         tm_file=rs6000/sysv4.h
  2141.         if [ x$gas = xyes ]
  2142.         then
  2143.              tmake_file=rs6000/t-ppcgas
  2144.         else
  2145.              tmake_file=rs6000/t-ppc
  2146.         fi
  2147.         xmake_file=rs6000/x-sysv4
  2148.         ;;
  2149.     powerpc-*-eabi*)
  2150.         cpu_type=rs6000
  2151.         tm_file=rs6000/eabi.h
  2152.         if [ x$gas = xyes ]
  2153.         then
  2154.              tmake_file=rs6000/t-eabigas
  2155.         else
  2156.              tmake_file=rs6000/t-eabi
  2157.         fi
  2158.         fixincludes=Makefile.in
  2159.         ;;
  2160.     powerpcle-*-sysv4* | powerpcle-*-elf*)
  2161.         cpu_type=rs6000
  2162.         xm_file=rs6000/xm-sysv4.h
  2163.         tm_file=rs6000/sysv4le.h
  2164.         if [ x$gas = xyes ]
  2165.         then
  2166.              tmake_file=rs6000/t-ppcgas
  2167.         else
  2168.              tmake_file=rs6000/t-ppc
  2169.         fi
  2170.         xmake_file=rs6000/x-sysv4
  2171.         ;;
  2172.     powerpcle-*-eabi*)
  2173.         cpu_type=rs6000
  2174.         tm_file=rs6000/eabile.h
  2175.         if [ x$gas = xyes ]
  2176.         then
  2177.              tmake_file=rs6000/t-eabigas
  2178.         else
  2179.              tmake_file=rs6000/t-eabi
  2180.         fi
  2181.         fixincludes=Makefile.in
  2182.         ;;
  2183.     rs6000-ibm-aix3.[01]*)
  2184.         tm_file=rs6000/aix31.h
  2185.         tmake_file=rs6000/t-rs6000
  2186.         xmake_file=rs6000/x-aix31
  2187.         use_collect2=yes
  2188.         ;;
  2189.     rs6000-ibm-aix3.2.[456789]*)
  2190.         tm_file=rs6000/aix3newas.h
  2191.         tmake_file=rs6000/t-rs6000
  2192.         use_collect2=yes
  2193.         ;;
  2194.     rs6000-ibm-aix[456789].*)
  2195.         tm_file=rs6000/aix41.h
  2196.         tmake_file=rs6000/t-rs6000
  2197.         xmake_file=rs6000/x-aix31
  2198.         use_collect2=yes
  2199.         ;;
  2200.     rs6000-ibm-aix*)
  2201.         use_collect2=yes
  2202.         tmake_file=rs6000/t-rs6000
  2203.         ;;
  2204.     rs6000-bull-bosx)
  2205.         tmake_file=rs6000/t-rs6000
  2206.         use_collect2=yes
  2207.         ;;
  2208.     rs6000-*-mach*)
  2209.         xm_file=rs6000/xm-mach.h
  2210.         tm_file=rs6000/mach.h
  2211.         tmake_file=rs6000/t-rs6000
  2212.         xmake_file=rs6000/x-mach
  2213.         use_collect2=yes
  2214.         ;;
  2215.     rs6000-*-lynxos*)
  2216.         xmake_file=rs6000/x-lynx
  2217.         xm_file=rs6000/xm-lynx.h
  2218.         tm_file=rs6000/lynx.h
  2219.         tmake_file=rs6000/t-rs6000
  2220.         use_collect2=yes
  2221.         ;;
  2222.     sh-*-*)
  2223.         cpu_type=sh
  2224.         ;;
  2225.     sparc-tti-*)
  2226.         tm_file=sparc/pbd.h
  2227.         xm_file=sparc/xm-pbd.h
  2228.         ;;
  2229.     sparc-wrs-vxworks* | sparclite-wrs-vxworks*)
  2230.         cpu_type=sparc
  2231.         tm_file=sparc/vxsparc.h
  2232.         tmake_file=sparc/t-vxsparc
  2233.         use_collect2=yes
  2234.         ;;
  2235.     sparc-*-aout*)
  2236.         tmake_file=sparc/t-sparcbare
  2237.         tm_file=sparc/sparc-aout.h
  2238.         ;;
  2239.     sparc-*-netbsd*)
  2240.         tm_file=sparc/netbsd.h
  2241.         xm_file=sparc/xm-netbsd.h
  2242.         # On NetBSD, the headers are already okay.
  2243.         fixincludes=Makefile.in
  2244.         tmake_file=t-libc-ok
  2245.         xmake_file=x-netbsd
  2246.         ;;
  2247.     sparc-*-bsd*)
  2248.         tm_file=sparc/bsd.h
  2249.         ;;
  2250.     sparc-*-lynxos*)
  2251.         if [ x$gas = xyes ]
  2252.         then
  2253.             tm_file=sparc/lynx.h
  2254.         else
  2255.             tm_file=sparc/lynx-ng.h
  2256.         fi
  2257.         xm_file=sparc/xm-lynx.h
  2258.         tmake_file=sparc/t-sunos41
  2259.         xmake_file=x-lynx
  2260.         ;;
  2261.     sparc-*-solaris2* | sparc-*-sunos5*)
  2262.         xm_file=sparc/xm-sol2.h
  2263.         tm_file=sparc/sol2.h
  2264.         tmake_file=sparc/t-sol2
  2265.         xmake_file=sparc/x-sysv4
  2266.         extra_parts="crt1.o crti.o crtn.o gmon.o crtbegin.o crtend.o"
  2267.         fixincludes=fixinc.svr4
  2268.         broken_install=yes
  2269.         ;;
  2270.     sparc-*-sunos4.0*)
  2271.         tm_file=sparc/sunos4.h
  2272.         tmake_file=sparc/t-sunos40
  2273.         use_collect2=yes
  2274.         ;;
  2275.     sparc-*-sunos4*)
  2276.         tm_file=sparc/sunos4.h
  2277.         tmake_file=sparc/t-sunos41
  2278.         use_collect2=yes
  2279.         ;;
  2280.     sparc-*-sunos3*)
  2281.         tm_file=sparc/sun4o3.h
  2282.         use_collect2=yes
  2283.         ;;
  2284.     sparc-*-sysv4*)
  2285.         xm_file=sparc/xm-sysv4.h
  2286.         tm_file=sparc/sysv4.h
  2287.         tmake_file=t-svr4
  2288.         xmake_file=sparc/x-sysv4
  2289.         extra_parts="crtbegin.o crtend.o"
  2290.         ;;
  2291.     sparclite-*-coff*)
  2292.         cpu_type=sparc
  2293.         tm_file=sparc/litecoff.h
  2294.         tmake_file=sparc/t-sparclite
  2295.         ;;
  2296.     sparclite-*-*)
  2297.         cpu_type=sparc
  2298.         tm_file=sparc/lite.h
  2299.         tmake_file=sparc/t-sparclite
  2300.         use_collect2=yes
  2301.         ;;
  2302.     sparc64-*-aout*)
  2303.         cpu_type=sparc
  2304.         tmake_file=sparc/t-sp64
  2305.         tm_file=sparc/sp64-aout.h
  2306.         ;;
  2307.     sparc64-*-elf*)
  2308.         cpu_type=sparc
  2309.         tmake_file=sparc/t-sp64
  2310.         tm_file=sparc/sp64-elf.h
  2311.         extra_parts="crtbegin.o crtend.o"
  2312.         ;;
  2313. # This hasn't been upgraded to GCC 2.
  2314. #    tahoe-harris-*)            # Harris tahoe, using COFF.
  2315. #        tm_file=tahoe/harris.h
  2316. #        ;;
  2317. #    tahoe-*-bsd*)            # tahoe running BSD
  2318. #        ;;
  2319. # This hasn't been upgraded to GCC 2.
  2320. #    tron-*-*)
  2321. #        cpu_type=gmicro
  2322. #        use_collect2=yes
  2323. #        ;;
  2324.     vax-*-bsd*)            # vaxen running BSD
  2325.         use_collect2=yes
  2326.         ;;
  2327.     vax-*-sysv*)            # vaxen running system V
  2328.         xm_file=vax/xm-vaxv.h
  2329.         tm_file=vax/vaxv.h
  2330.         ;;
  2331.     vax-*-netbsd*)
  2332.         tm_file=vax/netbsd.h
  2333.         xm_file=vax/xm-netbsd.h
  2334.         tmake_file=t-libc-ok
  2335.         # On NetBSD, the headers are already okay.
  2336.         fixincludes=Makefile.in
  2337.         xmake_file=x-netbsd
  2338.         ;;
  2339.     vax-*-ultrix*)            # vaxen running ultrix
  2340.         tm_file=vax/ultrix.h
  2341.         use_collect2=yes
  2342.         ;;
  2343.     vax-*-vms*)            # vaxen running VMS
  2344.         xm_file=vax/xm-vms.h
  2345.         tm_file=vax/vms.h
  2346.         ;;
  2347.         pdp11-*-*)
  2348.         xm_file=pdp11/xm-pdp11.h
  2349.         tm_file=pdp11/pdp11.h
  2350.         ;;
  2351.     we32k-att-sysv*)
  2352.         cpu_type=we32k
  2353.         use_collect2=yes
  2354.         ;;
  2355.     *)
  2356.         echo "Configuration $machine not supported" 1>&2
  2357.         exit 1
  2358.         ;;
  2359.     esac
  2360.  
  2361.     case $machine in
  2362.     *-*-gnu*)
  2363.         # On the GNU system, the setup is just about the same on
  2364.         # each different CPU.  The specific machines that GNU
  2365.         # supports are matched above and just set $cpu_type.
  2366.         xm_file=${cpu_type}/xm-gnu.h
  2367.         tm_file=${cpu_type}/gnu.h
  2368.         extra_parts="crtbegin.o crtend.o"
  2369.         # GNU always uses ELF.
  2370.         elf=yes
  2371.         # Don't build libgcc1.c, because there is no non-GNU
  2372.         # compiler to build it with.  The GNU system C library will
  2373.         # include assembly versions of any needed functions.
  2374.         tmake_file=t-libc-ok
  2375.         # GNU tools are the only tools.
  2376.         gnu_ld=yes
  2377.         gas=yes
  2378.         # On GNU, the headers are already okay.
  2379.         fixincludes=Makefile.in
  2380.         ;;
  2381.     *-*-sysv4*)
  2382.         fixincludes=fixinc.svr4
  2383.         xmake_try_sysv=x-sysv
  2384.         broken_install=yes
  2385.         install_headers_dir=install-headers-cpio
  2386.         ;;
  2387.     *-*-sysv*)
  2388.         broken_install=yes
  2389.         install_headers_dir=install-headers-cpio
  2390.         ;;
  2391.     esac
  2392.  
  2393.     # Distinguish i386 from i486/i586.
  2394.     # ??? For the moment we treat i586 as an i486.
  2395.     # Also, do not run mips-tfile on MIPS if using gas.
  2396.     case $machine in
  2397.     i[45]86-*-*)
  2398.         target_cpu_default=2
  2399.         ;;
  2400.     mips*-*-*)
  2401.         if [ x$gas = xyes ]
  2402.         then
  2403.             target_cpu_default=16
  2404.         fi
  2405.         ;;
  2406.     alpha-*-*)
  2407.         if [ x$gas = xyes ]
  2408.         then
  2409.             target_cpu_default=4
  2410.         fi
  2411.         ;;
  2412.     esac
  2413.  
  2414.     # No need for collect2 if we have the GNU linker.
  2415.     case x$gnu_ld in 
  2416.     xyes)
  2417.         use_collect2=
  2418.         ;;
  2419.     esac
  2420.  
  2421. # Default certain vars that apply to both host and target in turn.
  2422.     if [ x$cpu_type = x ]
  2423.     then cpu_type=`echo $machine | sed 's/-.*$//'`
  2424.     fi
  2425.  
  2426. # Save data on machine being used to compile GCC in build_xm_file.
  2427. # Save data on host machine in vars host_xm_file and host_xmake_file.
  2428.     if [ x$pass1done = x ]
  2429.     then
  2430.         if [ x$xm_file = x ]
  2431.         then build_xm_file=$cpu_type/xm-$cpu_type.h
  2432.         else build_xm_file=$xm_file
  2433.         fi
  2434.         pass1done=yes
  2435.     else
  2436.         if [ x$pass2done = x ]
  2437.         then
  2438.             if [ x$xm_file = x ]
  2439.             then host_xm_file=$cpu_type/xm-$cpu_type.h
  2440.             else host_xm_file=$xm_file
  2441.             fi
  2442.             if [ x$xmake_file = x ]
  2443.             then xmake_file=$cpu_type/x-$cpu_type
  2444.             fi
  2445.             host_xmake_file=$xmake_file
  2446.             host_broken_install=$broken_install
  2447.             host_install_headers_dir=$install_headers_dir
  2448.             host_truncate_target=$truncate_target
  2449.             pass2done=yes
  2450.         fi
  2451.     fi
  2452. done
  2453.  
  2454. # Default the target-machine variables that were not explicitly set.
  2455. if [ x$tm_file = x ]
  2456. then tm_file=$cpu_type/$cpu_type.h; fi
  2457.  
  2458. if [ x$extra_headers = x ]
  2459. then extra_headers=; fi
  2460.  
  2461. if [ x$xm_file = x ]
  2462. then xm_file=$cpu_type/xm-$cpu_type.h; fi
  2463.  
  2464. md_file=$cpu_type/$cpu_type.md
  2465.  
  2466. if [ x$out_file = x ]
  2467. then out_file=$cpu_type/$cpu_type.c; fi
  2468.  
  2469. if [ x$tmake_file = x ]
  2470. then tmake_file=$cpu_type/t-$cpu_type
  2471. fi
  2472.  
  2473. # Say what files are being used for the output code and MD file.
  2474. echo "Using \`$srcdir/config/$out_file' to output insns."
  2475. echo "Using \`$srcdir/config/$md_file' as machine description file."
  2476. echo "Using \`$srcdir/config/$tm_file' as target machine macro file."
  2477. echo "Using \`$srcdir/config/$host_xm_file' as host machine macro file."
  2478. if [ $host_xm_file != $build_xm_file ]; then
  2479.     echo "Using \`$srcdir/config/$build_xm_file' as build machine macro file."
  2480. fi
  2481.  
  2482. # Set up the list of links to be made.
  2483. # $links is the list of link names, and $files is the list of names to link to.
  2484. files="$host_xm_file $tm_file $xm_file $build_xm_file"
  2485. links="config.h tm.h tconfig.h hconfig.h"
  2486.  
  2487. rm -f config.bak
  2488. if [ -f config.status ]; then mv -f config.status config.bak; fi
  2489.  
  2490. # Make the links.
  2491. while [ -n "$files" ]
  2492. do
  2493.     # set file to car of files, files to cdr of files
  2494.     set $files; file=$1; shift; files=$*
  2495.     set $links; link=$1; shift; links=$*
  2496.  
  2497.     rm -f $link
  2498.     echo "#include \"$file\"" >$link
  2499. done
  2500.  
  2501. # Truncate the target if necessary
  2502. if [ x$host_truncate_target != x ]; then
  2503.     target=`echo $target | sed -e 's/\(..............\).*/\1/'`
  2504. fi
  2505.  
  2506. # Get the version number from the toplevel
  2507. version=`sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${srcdir}/version.c`
  2508.  
  2509. # For the current directory and all of the language subdirectories,
  2510. # do the rest of the script ...
  2511.  
  2512. subdirs=
  2513. for lang in ${srcdir}/*/config-lang.in ..
  2514. do
  2515.     case $lang in
  2516.     ..) ;;
  2517.     # The odd quoting in the next line works around
  2518.     # an apparent bug in bash 1.12 on linux.
  2519.     ${srcdir}/[*]/config-lang.in) ;;
  2520.     *) subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
  2521.     esac
  2522. done
  2523.  
  2524. # Are we using gcc as the native compiler?
  2525. case $canon_host in
  2526. *linux*)    # All Linux's use gcc as the native compiler.
  2527.     prefix=$native_prefix
  2528.     ;;
  2529. esac
  2530.  
  2531. # Make empty files to contain the specs and options for each language.
  2532. # Then add #include lines to for a compiler that has specs and/or options.
  2533.  
  2534. lang_specs_files=
  2535. lang_options_files=
  2536. rm -f specs.h options.h
  2537. touch specs.h options.h
  2538. for lang_specs in $srcdir/*/lang-specs.h
  2539. do
  2540.     echo "#include \"$lang_specs\"" >>specs.h
  2541.     lang_specs_files="$lang_specs_files $lang_specs"
  2542. done
  2543. for lang_options in $srcdir/*/lang-options.h
  2544. do
  2545.     echo "#include \"$lang_options\"" >>options.h
  2546.     lang_options_files="$lang_options_files $lang_options"
  2547. done
  2548.  
  2549. # Define SET_MAKE if this old version of `make' doesn't define $(MAKE).
  2550. rm -f Makefile.xx
  2551. (echo 'all:'; echo '    @echo maketemp=$(MAKE)') >Makefile.xx
  2552. case `${MAKE-make} -f Makefile.xx 2>/dev/null | grep maketemp=` in
  2553. 'maketemp=')
  2554.     SET_MAKE="MAKE = ${MAKE-make}"
  2555.     ;;
  2556. *)
  2557.     SET_MAKE=
  2558.     ;;
  2559. esac
  2560. rm -f Makefile.xx
  2561.  
  2562. savesrcdir=$srcdir
  2563. for subdir in . $subdirs
  2564. do
  2565.     oldsrcdir=$savesrcdir
  2566.  
  2567.     # Re-adjust the path
  2568.     case $oldsrcdir in
  2569.     /*)
  2570.         srcdir=$oldsrcdir/$subdir
  2571.         ;;
  2572.     *)
  2573.         case $subdir in
  2574.         .)
  2575.             ;;
  2576.         *)
  2577.             oldsrcdir=../${oldsrcdir}
  2578.             srcdir=$oldsrcdir/$subdir
  2579.             ;;
  2580.         esac
  2581.         ;;
  2582.     esac
  2583.     mainsrcdir=$oldsrcdir
  2584.     STARTDIR=`pwd`
  2585.     test -d $subdir || mkdir $subdir
  2586.     cd $subdir
  2587.  
  2588.     # Create Makefile.tem from Makefile.in.
  2589.     # Make it set VPATH if necessary so that the sources are found.
  2590.     # Also change its value of srcdir.
  2591.     # Also create a .gdbinit file which runs the one in srcdir
  2592.     # and tells GDB to look there for source files.
  2593.     case $srcdir in
  2594.     . | ./$subdir | .././$subdir)
  2595.         rm -f Makefile.tem
  2596.         cp Makefile.in Makefile.tem
  2597.         chmod +w Makefile.tem
  2598.         ;;
  2599.     *)
  2600.         rm -f Makefile.tem
  2601.         echo "VPATH = ${srcdir}" \
  2602.           | cat - ${srcdir}/Makefile.in \
  2603.           | sed "s@^srcdir = \.@srcdir = ${srcdir}@" > Makefile.tem
  2604.         rm -f .gdbinit
  2605.         echo "dir ." > .gdbinit
  2606.         echo "dir ${srcdir}" >> .gdbinit
  2607.         if [ x$gdb_needs_out_file_path = xyes ]
  2608.         then
  2609.             echo "dir ${srcdir}/config/"`dirname ${out_file}` >> .gdbinit
  2610.         fi
  2611.         if [ "x$subdirs" != x ]; then
  2612.             for s in $subdirs
  2613.             do
  2614.                 echo "dir ${srcdir}/$s" >> .gdbinit
  2615.             done
  2616.         fi
  2617.         echo "source ${srcdir}/.gdbinit" >> .gdbinit
  2618.         ;;
  2619.     esac
  2620.     
  2621.     # Conditionalize the makefile for this host machine.
  2622.     if [ -f ${mainsrcdir}/config/${host_xmake_file} ]
  2623.     then
  2624.         rm -f Makefile.xx
  2625.         sed -e "/####host/  r ${mainsrcdir}/config/${host_xmake_file}" Makefile.tem > Makefile.xx
  2626.         echo "Merged ${host_xmake_file}."
  2627.         rm -f Makefile.tem
  2628.         mv Makefile.xx Makefile.tem
  2629.         dep_host_xmake_file=${host_xmake_file}
  2630.     else
  2631.     # Say in the makefile that there is no host_xmake_file,
  2632.     # by using a name which (when interpreted relative to $srcdir/config)
  2633.     # will duplicate another dependency: $srcdir/Makefile.in.
  2634.         dep_host_xmake_file=../Makefile.in
  2635.     fi
  2636.  
  2637.     # Add a definition for MAKE if system wants one.
  2638.     case "$SET_MAKE" in
  2639.     ?*)
  2640.         rm -f Makefile.xx
  2641.         (echo "$SET_MAKE"; cat Makefile.tem) >Makefile.xx
  2642.         rm -f Makefile.tem
  2643.         mv Makefile.xx Makefile.tem
  2644.     esac
  2645.  
  2646.     # Add a definition for INSTALL if system wants one.
  2647.     # This substitutes for lots of x-* files.
  2648.     if [ x$host_broken_install = x ]
  2649.     then true
  2650.     else
  2651.         rm -f Makefile.xx
  2652.          if [ x$host_broken_install = xyes ]
  2653.          then
  2654.              abssrcdir=`cd ${srcdir}; pwd`
  2655.              installer="${abssrcdir}/install.sh -c"
  2656.          else
  2657.              installer=$host_broken_install
  2658.          fi
  2659.          sed "s|^INSTALL = .*|INSTALL = ${installer}|" Makefile.tem > Makefile.xx
  2660.         rm -f Makefile.tem
  2661.         mv Makefile.xx Makefile.tem
  2662.     fi
  2663.  
  2664.     # Some of the following don't make sense in the language makefiles,
  2665.     # but rather than introduce another level of nesting, we leave them
  2666.     # as is.
  2667.  
  2668.     # Set EXTRA_HEADERS according to extra_headers.
  2669.     # This substitutes for lots of t-* files.
  2670.     if [ "x$extra_headers" = x ]
  2671.     then true
  2672.     else
  2673.         # Prepend ${srcdir}/ginclude/ to every entry in extra_headers.
  2674.         list=
  2675.         for file in $extra_headers;
  2676.         do
  2677.             list="${list} ${srcdir}/ginclude/${file}"
  2678.         done
  2679.         rm -f Makefile.xx
  2680.         sed "s|^EXTRA_HEADERS =|EXTRA_HEADERS = ${list}|" Makefile.tem > Makefile.xx
  2681.         rm -f Makefile.tem
  2682.         mv Makefile.xx Makefile.tem
  2683.     fi
  2684.     
  2685.     # Set EXTRA_PASSES according to extra_passes.
  2686.     # This substitutes for lots of t-* files.
  2687.     if [ "x$extra_passes" = x ]
  2688.     then true
  2689.     else
  2690.         rm -f Makefile.xx
  2691.         sed "s/^EXTRA_PASSES =/EXTRA_PASSES = $extra_passes/" Makefile.tem > Makefile.xx
  2692.         rm -f Makefile.tem
  2693.         mv Makefile.xx Makefile.tem
  2694.     fi
  2695.     
  2696.     # Set EXTRA_PARTS according to extra_parts.
  2697.     # This substitutes for lots of t-* files.
  2698.     if [ "x$extra_parts" = x ]
  2699.     then true
  2700.     else
  2701.         rm -f Makefile.xx
  2702.         sed "s/^EXTRA_PARTS =/EXTRA_PARTS = $extra_parts/" Makefile.tem > Makefile.xx
  2703.         rm -f Makefile.tem
  2704.         mv Makefile.xx Makefile.tem
  2705.     fi
  2706.  
  2707.     # Set EXTRA_PROGRAMS according to extra_programs.
  2708.     if [ "x$extra_programs" = x ]
  2709.     then true
  2710.     else
  2711.         rm -f Makefile.xx
  2712.         sed "s/^EXTRA_PROGRAMS =/EXTRA_PROGRAMS = $extra_programs/" Makefile.tem > Makefile.xx
  2713.         rm -f Makefile.tem
  2714.         mv Makefile.xx Makefile.tem
  2715.     fi
  2716.  
  2717.     # Set EXTRA_OBJS according to extra_objs.
  2718.     # This substitutes for lots of t-* files.
  2719.     if [ "x$extra_objs" = x ]
  2720.     then true
  2721.     else
  2722.         rm -f Makefile.xx
  2723.         sed "s|^EXTRA_OBJS =|EXTRA_OBJS = $extra_objs|" Makefile.tem > Makefile.xx
  2724.         rm -f Makefile.tem
  2725.         mv Makefile.xx Makefile.tem
  2726.     fi
  2727.  
  2728.     # Add a definition of USE_COLLECT2 if system wants one.
  2729.     # Also tell toplev.c what to do.
  2730.     # This substitutes for lots of t-* files.
  2731.     if [ x$use_collect2 = x ]
  2732.     then true
  2733.     else
  2734.         rm -f Makefile.xx
  2735.         (echo "USE_COLLECT2 = ld"; echo "MAYBE_USE_COLLECT2 = -DUSE_COLLECT2")\
  2736.             | cat - Makefile.tem > Makefile.xx
  2737.         rm -f Makefile.tem
  2738.         mv Makefile.xx Makefile.tem
  2739.     fi
  2740.     
  2741.     # Add -DTARGET_CPU_DEFAULT for toplev.c if system wants one.
  2742.     # This substitutes for lots of *.h files.
  2743.     if [ x$target_cpu_default = x ]
  2744.     then true
  2745.     else
  2746.         rm -f Makefile.xx
  2747.     # This used cat, but rfg@netcom.com said that ran into NFS bugs.
  2748.         sed -e "/^# Makefile for GNU C compiler./c\\
  2749. MAYBE_TARGET_DEFAULT = -DTARGET_CPU_DEFAULT=$target_cpu_default\\
  2750. \# Makefile for GNU C compiler." Makefile.tem > Makefile.xx
  2751.         rm -f Makefile.tem
  2752.         mv Makefile.xx Makefile.tem
  2753.     fi
  2754.     
  2755.     # Set MD_DEPS if the real md file is in md.pre-cpp.
  2756.     # Set MD_CPP to the cpp to pass the md file through.  Md files use ';'
  2757.     # for line oriented comments, so we must always use a GNU cpp.  If
  2758.     # building gcc with a cross compiler, use the cross compiler just
  2759.     # built.  Otherwise, we can use the cpp just built.
  2760.     if [ "x$md_cppflags" = x ]
  2761.     then
  2762.         md_file=$srcdir/config/$md_file
  2763.     else
  2764.         rm -f Makefile.xx
  2765.           (if [ x$host = x$build ] ; then
  2766.             echo "MD_DEPS = $(md_file) cpp" ; echo "MD_CPP = ./cpp"
  2767.         else
  2768.             echo "MD_DEPS = md.pre-cpp" ; echo "MD_CPP = \$(HOST_CC) -x c -E"
  2769.         fi
  2770.         md_file=md
  2771.         echo "MD_CPPFLAGS = $md_cppflags") | \
  2772.           cat - Makefile.tem | sed -e "s|^MD_FILE[     ]*=.*|MD_FILE = md|" > Makefile.xx
  2773.         rm -f Makefile.tem
  2774.         mv Makefile.xx Makefile.tem
  2775.     fi
  2776.     
  2777.     # If we have gas in the build tree, make a link to it.
  2778.     if [ -f ../gas/Makefile ]; then
  2779.         rm -f as; $symbolic_link ../gas/as.new as 2>/dev/null
  2780.     fi
  2781.     
  2782.     # If we have ld in the build tree, make a link to it.
  2783.     if [ -f ../ld/Makefile ]; then
  2784.         if [ x$use_collect2 = x ]; then
  2785.             rm -f ld; $symbolic_link ../ld/ld.new ld 2>/dev/null
  2786.         else
  2787.             rm -f collect-ld; $symbolic_link ../ld/ld.new collect-ld 2>/dev/null
  2788.         fi
  2789.     fi
  2790.     
  2791.     # If using -program-transform-name, override the installation names.
  2792.     if [ "x${program_transform_set}" = "xyes" ] ; then
  2793.         sed -e "s/^program_transform_name[     ]*=.*$/program_transform_name = $program_transform_name/" \
  2794.             -e "s/^program_transform_cross_name[     ]*=.*$/program_transform_cross_name = $program_transform_name/" \
  2795.             Makefile.tem > Makefile.xx
  2796.         rm -f Makefile.tem
  2797.         mv Makefile.xx Makefile.tem
  2798.     fi
  2799.     
  2800.     # Conditionalize the makefile for this target machine.
  2801.     if [ -f ${mainsrcdir}/config/${tmake_file} ]
  2802.     then
  2803.         rm -f Makefile.xx
  2804.         sed -e "/####target/  r ${mainsrcdir}/config/${tmake_file}" Makefile.tem > Makefile.xx
  2805.         echo "Merged ${tmake_file}."
  2806.         rm -f Makefile.tem
  2807.         mv Makefile.xx Makefile.tem
  2808.         dep_tmake_file=${tmake_file}
  2809.     else
  2810.     # Say in the makefile that there is no tmake_file,
  2811.     # by using a name which (when interpreted relative to $srcdir/config)
  2812.     # will duplicate another dependency: $srcdir/Makefile.in.
  2813.         dep_tmake_file=../Makefile.in
  2814.     fi
  2815.     
  2816.     # If this is the top level Makefile, add the language fragments.
  2817.     # Languages are added via two mechanisms.  Some information must be
  2818.     # recorded in makefile variables, these are defined in config-lang.in.
  2819.     # We accumulate them and plug them into the main Makefile.
  2820.     # The other mechanism is a set of hooks for each of the main targets
  2821.     # like `clean', `install', etc.
  2822.     if [ $subdir = . ]
  2823.     then
  2824.         # These (without "all_") are set in each config-lang.in.
  2825.         # `language' must be a single word so is spelled singularly.
  2826.         all_languages=
  2827.         all_compilers=
  2828.         all_stagestuff=
  2829.         all_diff_excludes=
  2830.         # List of language makefile fragments.
  2831.         all_lang_makefiles=
  2832.  
  2833.         rm -f Makefile.xx Makefile.ll
  2834.         touch Makefile.ll
  2835.         for s in .. $subdirs
  2836.         do
  2837.             if [ $s != ".." ]
  2838.             then
  2839.                 language=
  2840.                 compilers=
  2841.                 stagestuff=
  2842.                 diff_excludes=
  2843.                 . ${mainsrcdir}/$s/config-lang.in
  2844.                 if [ "x$language" = x ]
  2845.                 then
  2846.                     echo "${mainsrcdir}/$s/config-lang.in doesn't set \$language." 1>&2
  2847.                     exit 1
  2848.                 fi
  2849.                 all_lang_makefiles="$all_lang_makefiles ${mainsrcdir}/$s/Make-lang.in ${mainsrcdir}/$s/Makefile.in"
  2850.                 all_languages="$all_languages $language"
  2851.                 all_compilers="$all_compilers $compilers"
  2852.                 all_stagestuff="$all_stagestuff $stagestuff"
  2853.                 all_diff_excludes="$all_diff_excludes $diff_excludes"
  2854.  
  2855.                 cat ${mainsrcdir}/$s/Make-lang.in >> Makefile.ll
  2856.             fi
  2857.         done
  2858.         sed -e "/####language fragments/ r Makefile.ll" Makefile.tem > Makefile.xx
  2859.         rm -f Makefile.tem
  2860.         mv Makefile.xx Makefile.tem
  2861.         sed -e "s|^SUBDIRS[     ]*=.*$|SUBDIRS = $subdirs|" \
  2862.             -e "s|^LANGUAGES[     ]*=[     ]*\(.*\)$|LANGUAGES = \1 $all_languages|" \
  2863.             -e "s|^COMPILERS[     ]*=[     ]*\(.*\)$|COMPILERS = \1 $all_compilers|" \
  2864.             -e "s|^LANG_MAKEFILES[     ]*=.*$|LANG_MAKEFILES = $all_lang_makefiles|" \
  2865.             -e "s|^LANG_STAGESTUFF[     ]*=.*$|LANG_STAGESTUFF = $all_stagestuff|" \
  2866.             -e "s|^LANG_DIFF_EXCLUDES[     ]*=.*$|LANG_DIFF_EXCLUDES = $all_diff_excludes|" \
  2867.             Makefile.tem > Makefile.xx
  2868.         rm -f Makefile.tem
  2869.         mv Makefile.xx Makefile.tem
  2870.  
  2871.         # Since we can't use `::' targets, we link each language in
  2872.         # with a set of hooks, reached indirectly via lang.${target}.
  2873.  
  2874.         target_list="all.build all.cross start.encap rest.encap \
  2875.             info dvi \
  2876.             install-normal install-common install-info install-man \
  2877.             uninstall distdir \
  2878.             mostlyclean clean distclean extraclean maintainer-clean \
  2879.             stage1 stage2 stage3 stage4"
  2880.         rm -f Makefile.ll
  2881.         for t in $target_list
  2882.         do
  2883.             x=
  2884.             for l in .. $all_languages
  2885.             do
  2886.                 if [ $l != ".." ]; then
  2887.                     x="$x $l.$t"
  2888.                 fi
  2889.             done
  2890.             echo "lang.$t: $x" >> Makefile.ll
  2891.         done
  2892.         sed -e "/####language hooks/ r Makefile.ll" Makefile.tem > Makefile.xx
  2893.         rm -f Makefile.tem
  2894.         mv Makefile.xx Makefile.tem
  2895.         rm -f Makefile.ll
  2896.  
  2897.         # If the host doesn't support symlinks, modify CC in
  2898.         # FLAGS_TO_PASS so CC="stage1/xgcc -Bstage1/" works.
  2899.         # Otherwise, we can use "CC=$(CC)".
  2900.         rm -f symtest.tem
  2901.         if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
  2902.         then
  2903.             sed -e 's,CC=set-by-configure,CC=\$(CC),' \
  2904.                 Makefile.tem > Makefile.xx
  2905.         else
  2906.             sed -e "s,CC=set-by-configure,CC=\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`," \
  2907.                 Makefile.tem > Makefile.xx
  2908.         fi
  2909.         rm -f Makefile.tem
  2910.         mv Makefile.xx Makefile.tem
  2911.         rm -f symtest.tem
  2912.  
  2913.         if [ "x$all_languages" != x ]
  2914.         then
  2915.             # Missing space after `Merged' is intentional.
  2916.             echo "Merged$all_languages fragment(s)."
  2917.         fi
  2918.  
  2919.     # Otherwise, this is a language subdirectory.  If the host supports
  2920.     # symlinks, point stage[123] at ../stage[123] so bootstrapping and the
  2921.     # installation procedure can still use CC="stage1/xgcc -Bstage1/".
  2922.     # If the host doesn't support symlinks, FLAGS_TO_PASS has been
  2923.     # modified to solve the problem there.
  2924.     else
  2925.         for t in stage1 stage2 stage3 stage4 include
  2926.         do
  2927.             rm -f $t
  2928.             $symbolic_link ../$t $t 2>/dev/null
  2929.         done
  2930.     fi
  2931.  
  2932.     out_object_file=`basename $out_file .c`.o
  2933.     
  2934.     # Remove all formfeeds, since some Makes get confused by them.
  2935.     # Also arrange to give the variables `target', `host_xmake_file',
  2936.     # `tmake_file', `prefix', `local_prefix', `exec_prefix', `FIXINCLUDES'
  2937.     # `out_file', `out_object', `md_file', `lang_specs_files',
  2938.     # `lang_options_files', and `INSTALL_HEADERS_DIR' values in the
  2939.     # Makefile from the values they have in this script.
  2940.     rm -f Makefile.xx
  2941.     rm -f aux-output.c aux-output.o md
  2942.     echo 's| ||' > Makefile.sed
  2943.     echo "s|^target=.*$|target=${target}|" >> Makefile.sed
  2944.     echo "s|^xmake_file=.*$|xmake_file=${dep_host_xmake_file}|" >> Makefile.sed
  2945.     echo "s|^tmake_file=.*$|tmake_file=${dep_tmake_file}|" >> Makefile.sed
  2946.     echo "s|^version=.*$|version=${version}|" >> Makefile.sed
  2947.     echo "s|^version=.*$|version=${version}|" >> Makefile.sed
  2948.     echo "s|^out_file=.*$|out_file=${srcdir}/config/${out_file}|" >> Makefile.sed
  2949.     echo "s|^out_object_file=.*$|out_object_file=${out_object_file}|" >> Makefile.sed
  2950.     echo "s|^md_file=.*$|md_file=${md_file}|" >> Makefile.sed
  2951.     echo "s|^tm_file=.*$|tm_file=${srcdir}/config/${tm_file}|" >> Makefile.sed
  2952.     echo "s|^host_xm_file=.*$|host_xm_file=${srcdir}/config/${host_xm_file}|" >> Makefile.sed
  2953.     echo "s|^build_xm_file=.*$|build_xm_file=${srcdir}/config/${build_xm_file}|" >> Makefile.sed
  2954.     echo "s|^lang_specs_files=.*$|lang_specs_files=${lang_specs_files}|" >> Makefile.sed
  2955.     echo "s|^lang_options_files=.*$|lang_options_files=${lang_options_files}|" >> Makefile.sed
  2956.     echo "s|^prefix[     ]*=.*|prefix = $prefix|" >> Makefile.sed
  2957.     echo "s|^gxx_include_dir[     ]*=.*|gxx_include_dir = $gxx_include_dir|" >> Makefile.sed
  2958.     echo "s|^local_prefix[     ]*=.*|local_prefix = $local_prefix|" >> Makefile.sed
  2959.     echo "s|^exec_prefix[     ]*=.*|exec_prefix = $exec_prefix|" >> Makefile.sed
  2960.     echo "s|^FIXINCLUDES[     ]*=.*|FIXINCLUDES = $fixincludes|" >> Makefile.sed
  2961.     echo "s|^INSTALL_HEADERS_DIR[     ]*=.*$|INSTALL_HEADERS_DIR = ${host_install_headers_dir}|" >> Makefile.sed
  2962.     sed -f Makefile.sed Makefile.tem > Makefile.xx
  2963.     rm -f Makefile.tem Makefile.sed
  2964.     mv Makefile.xx Makefile.tem
  2965.     
  2966.     # Install Makefile for real, after making final changes.
  2967.     # Define macro CROSS_COMPILE in compilation if this is a cross-compiler.
  2968.     # Also use all.cross instead of all.internal, and add cross-make to Makefile.
  2969.     if [ x$canon_host = x$canon_target ]
  2970.     then
  2971.         rm -f Makefile
  2972.           if [ x$canon_host = x$canon_build ]
  2973.         then
  2974.             mv Makefile.tem Makefile
  2975.         else
  2976.     #        When building gcc with a cross-compiler, we need to fix a
  2977.     #        few things.
  2978.             echo "build= $build" > Makefile
  2979.                 sed -e "s|objc-runtime$||" \
  2980.                 -e "/####build/  r ${mainsrcdir}/build-make" Makefile.tem >> Makefile
  2981.             rm -f Makefile.tem Makefile.xx
  2982.         fi
  2983.     else
  2984.         rm -f Makefile
  2985.         echo "CROSS=-DCROSS_COMPILE" > Makefile
  2986.         sed -e "/####cross/  r ${mainsrcdir}/cross-make" Makefile.tem >> Makefile
  2987.         rm -f Makefile.tem Makefile.xx
  2988.     fi
  2989.  
  2990.     echo "Created \`$subdir/Makefile'."
  2991.  
  2992.     # If a subdirectory has a configure script, run it.
  2993.     if [ x$subdir != x. ]
  2994.     then
  2995.         if [ -f $srcdir/configure ]
  2996.         then
  2997.             ${CONFIG_SHELL-sh} $srcdir/configure $arguments --srcdir=$srcdir
  2998.         fi
  2999.     fi
  3000.  
  3001.     cd $STARTDIR
  3002. done   # end of current-dir SUBDIRS loop
  3003.     
  3004. srcdir=$savesrcdir
  3005.  
  3006. # Describe the chosen configuration in config.status.
  3007. # Make that file a shellscript which will reestablish the same configuration.
  3008. echo "#!/bin/sh
  3009. # GCC was configured as follows:
  3010. ${srcdir}/configure" $arguments > config.new
  3011. echo echo host=$canon_host target=$canon_target build=$canon_build >> config.new
  3012. chmod a+x config.new
  3013. if [ -f config.bak ] && cmp config.bak config.new >/dev/null 2>/dev/null;
  3014. then
  3015.     mv -f config.bak config.status
  3016.     rm -f config.new
  3017. else
  3018.     mv -f config.new config.status
  3019.     rm -f config.bak
  3020. fi
  3021.  
  3022. str2=
  3023. str3=
  3024. str4=.
  3025.  
  3026. if [ x$canon_host = x$canon_target ]
  3027. then
  3028.     str1="native "
  3029. else
  3030.     str1="cross-"
  3031.     str2=" from $canon_host"
  3032. fi
  3033.  
  3034. if [ x$canon_host != x$canon_build ]
  3035. then
  3036.     str3=" on a $canon_build system"
  3037. fi
  3038.  
  3039. if [ "x$str2" != x ] || [ "x$str3" != x ]
  3040. then
  3041.     str4=
  3042. fi
  3043.  
  3044. echo "Links are now set up to build a ${str1}compiler for ${canon_target}$str4" 1>&2
  3045.  
  3046. if [ "x$str2" != x ] || [ "x$str3" != x ]
  3047. then
  3048.     echo " ${str2}${str3}." 1>&2
  3049. fi
  3050.  
  3051. exit 0
  3052.